From 4044674ab49f32b6b7953d8af9f7bf91338d0540 Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Fri, 14 Jul 2000 06:12:29 +0000 Subject: [PATCH] Put the HMAC keys into the HMAC object instead on having them saved elsewhere; we can use now silc_hmac_make instead of silc_hmac_make_with_key. --- apps/silc/protocol.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/apps/silc/protocol.c b/apps/silc/protocol.c index e914d5a6..31fb99b2 100644 --- a/apps/silc/protocol.c +++ b/apps/silc/protocol.c @@ -23,6 +23,11 @@ /* * $Id$ * $Log$ + * Revision 1.6 2000/07/14 06:12:29 priikone + * Put the HMAC keys into the HMAC object instead on having them + * saved elsewhere; we can use now silc_hmac_make instead of + * silc_hmac_make_with_key. + * * Revision 1.5 2000/07/07 11:36:09 priikone * Inform user when received unsupported public key from server. * @@ -143,11 +148,7 @@ static void silc_client_protocol_ke_set_keys(SilcSKE ske, /* Save HMAC key to be used in the communication. */ silc_hash_alloc(hash->hash->name, &nhash); silc_hmac_alloc(nhash, &win->hmac); - win->hmac_key_len = keymat->hmac_key_len; - win->hmac_key = silc_calloc(win->hmac_key_len, - sizeof(unsigned char)); - memcpy(win->hmac_key, keymat->hmac_key, keymat->hmac_key_len); - + silc_hmac_set_key(win->hmac, keymat->hmac_key, keymat->hmac_key_len); } /* Performs key exchange protocol. This is used for both initiator -- 2.24.0