updates.
[silc.git] / apps / silcd / protocol.c
index fdb7a38e8c66679697024af832fa4a86ada7bb7a..ecca5e688776ec5ea88428671ba5056370218227 100644 (file)
@@ -346,6 +346,8 @@ SILC_TASK_CALLBACK(silc_server_protocol_key_exchange)
        * End protocol
        */
       SilcSKEKeyMaterial *keymat;
+      int key_len = silc_cipher_get_key_len(ctx->ske->prop->cipher, NULL);
+      int hash_len = ctx->ske->prop->hash->hash->hash_len;
 
       /* Send Ok to the other end if we are responder. If we are 
         initiator we have sent this already. */
@@ -354,7 +356,8 @@ SILC_TASK_CALLBACK(silc_server_protocol_key_exchange)
 
       /* Process the key material */
       keymat = silc_calloc(1, sizeof(*keymat));
-      silc_ske_process_key_material(ctx->ske, 16, (16 * 8), 16, keymat);
+      silc_ske_process_key_material(ctx->ske, 16, key_len, hash_len,
+                                   keymat);
 
       /* Take the new keys into use. */
       if (!silc_server_protocol_ke_set_keys(ctx->ske, ctx->sock, keymat,