From 3b81da21c2a515cac146bdf164ccc32ad83fc069 Mon Sep 17 00:00:00 2001 From: Aris Adamantiadis Date: Sat, 13 Jul 2013 18:12:10 +0200 Subject: DH: fix rekeying when using aes256 and bigger --- src/dh.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dh.c b/src/dh.c index 16c15e6..c56b42c 100644 --- a/src/dh.c +++ b/src/dh.c @@ -983,7 +983,7 @@ int generate_session_keys(ssh_session session) { goto error; } ssh_mac_update(ctx, k_string, ssh_string_len(k_string) + 4); - ssh_mac_update(ctx, crypto->session_id, + ssh_mac_update(ctx, crypto->secret_hash, crypto->digest_len); ssh_mac_update(ctx, crypto->encryptkey, crypto->digest_len); ssh_mac_final(crypto->encryptkey + crypto->digest_len, ctx); @@ -995,7 +995,7 @@ int generate_session_keys(ssh_session session) { goto error; ctx = ssh_mac_ctx_init(crypto->mac_type); ssh_mac_update(ctx, k_string, ssh_string_len(k_string) + 4); - ssh_mac_update(ctx, crypto->session_id, + ssh_mac_update(ctx, crypto->secret_hash, crypto->digest_len); ssh_mac_update(ctx, crypto->decryptkey, crypto->digest_len); ssh_mac_final(crypto->decryptkey + crypto->digest_len, ctx); -- cgit