Fixed silc_hmac_init_with_key, which didn't set the key correctly.
authorPekka Riikonen <priikone@silcnet.org>
Sat, 2 Nov 2002 19:19:14 +0000 (19:19 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Sat, 2 Nov 2002 19:19:14 +0000 (19:19 +0000)
lib/silccrypt/silchmac.c

index 1cce72cd2d4d3e175ba69c308abc4db812f4bac9..e839956ed6989f1e9e5f9100ea4b512ce2b795ad 100644 (file)
@@ -429,7 +429,7 @@ void silc_hmac_init_with_key(SilcHmac hmac, const unsigned char *key,
                             SilcUInt32 key_len)
 {
   SilcHash hash = hmac->hash;
-  silc_hmac_init_internal(hmac, hmac->key, hmac->key_len);
+  silc_hmac_init_internal(hmac, (unsigned char *)key, key_len);
   silc_hash_init(hash);
   silc_hash_update(hash, hmac->inner_pad, silc_hash_block_len(hash));
 }