updates.
[silc.git] / lib / silcclient / protocol.c
index 4444a8b31df389d27d28f6e8ac60831f70b990d7..06e0efd08f59b82b8e41110cc0d1d585afdace17 100644 (file)
@@ -351,10 +351,13 @@ SILC_TASK_CALLBACK(silc_client_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;
 
       /* 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 negotiated keys into use. */
       silc_client_protocol_ke_set_keys(ctx->ske, ctx->sock, keymat,