idata->rekey->ske_group = silc_ske_group_get_number(group);
/* Save the hash */
- if (!silc_hash_alloc(hash->hash->name, &idata->hash)) {
+ if (!silc_hash_alloc(silc_hash_get_name(hash), &idata->hash)) {
silc_cipher_free(idata->send_key);
silc_cipher_free(idata->receive_key);
silc_hmac_free(idata->hmac_send);
silc_hmac_free(idata->hmac_receive);
silc_free(conn_data);
- SILC_LOG_ERROR(("Cannot allocate algorithm: %s", hash->hash->name));
+ SILC_LOG_ERROR(("Cannot allocate algorithm: %s",
+ silc_hash_get_name(hash)));
return FALSE;
}
sock->hostname, sock->ip,
idata->send_key->cipher->name,
(char *)silc_hmac_get_name(idata->hmac_send),
- idata->hash->hash->name,
+ silc_hash_get_name(idata->hash),
ske->prop->flags & SILC_SKE_SP_FLAG_PFS ? "PFS" : ""));
return TRUE;
*/
SilcSKEKeyMaterial *keymat;
int key_len = silc_cipher_get_key_len(ctx->ske->prop->cipher);
- int hash_len = ctx->ske->prop->hash->hash->hash_len;
+ int hash_len = silc_hash_len(ctx->ske->prop->hash);
/* Process the key material */
keymat = silc_calloc(1, sizeof(*keymat));
SilcIDListData idata = (SilcIDListData)ctx->sock->user_data;
SilcSKEKeyMaterial *keymat;
SilcUInt32 key_len = silc_cipher_get_key_len(idata->send_key);
- SilcUInt32 hash_len = idata->hash->hash->hash_len;
+ SilcUInt32 hash_len = silc_hash_len(idata->hash);
SILC_LOG_DEBUG(("Generating new %s session keys (no PFS)",
send ? "sending" : "receiving"));
SilcIDListData idata = (SilcIDListData)ctx->sock->user_data;
SilcSKEKeyMaterial *keymat;
SilcUInt32 key_len = silc_cipher_get_key_len(idata->send_key);
- SilcUInt32 hash_len = idata->hash->hash->hash_len;
+ SilcUInt32 hash_len = silc_hash_len(idata->hash);
unsigned char *tmpbuf;
SilcUInt32 klen;