summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2013-07-13 18:12:10 +0200
committerAris Adamantiadis <aris@0xbadc0de.be>2013-07-13 18:12:10 +0200
commit3b81da21c2a515cac146bdf164ccc32ad83fc069 (patch)
tree14e07e3583557464b8dc39d6a8d17da5e1c62d69 /src
parented7e3c936b53cd6a26571274be7f9340b4de1770 (diff)
downloadlibssh-3b81da21c2a515cac146bdf164ccc32ad83fc069.tar.gz
libssh-3b81da21c2a515cac146bdf164ccc32ad83fc069.tar.xz
libssh-3b81da21c2a515cac146bdf164ccc32ad83fc069.zip
DH: fix rekeying when using aes256 and bigger
Diffstat (limited to 'src')
-rw-r--r--src/dh.c4
1 files 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);