diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2013-07-13 22:56:07 +0200 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2013-07-13 22:56:07 +0200 |
commit | dd6a0b51acea0e7b24eea800fd27b3f96c0ed8cb (patch) | |
tree | bd0d7e850aa66722a7b4ca1f3b6912d23119b167 /src/pki.c | |
parent | 3b81da21c2a515cac146bdf164ccc32ad83fc069 (diff) | |
download | libssh-dd6a0b51acea0e7b24eea800fd27b3f96c0ed8cb.tar.gz libssh-dd6a0b51acea0e7b24eea800fd27b3f96c0ed8cb.tar.xz libssh-dd6a0b51acea0e7b24eea800fd27b3f96c0ed8cb.zip |
Server: fix rekeying
Diffstat (limited to 'src/pki.c')
-rw-r--r-- | src/pki.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1381,18 +1381,18 @@ ssh_string ssh_srv_pki_do_sign_sessionid(ssh_session session, if (session == NULL || privkey == NULL || !ssh_key_is_private(privkey)) { return NULL; } - crypto = session->current_crypto ? session->current_crypto : - session->next_crypto; + crypto = session->next_crypto ? session->next_crypto : + session->current_crypto; ctx = sha1_init(); if (ctx == NULL) { return NULL; } - if (crypto->session_id == NULL){ - ssh_set_error(session,SSH_FATAL,"Missing session_id"); + if (crypto->secret_hash == NULL){ + ssh_set_error(session,SSH_FATAL,"Missing secret_hash"); return NULL; } - sha1_update(ctx, crypto->session_id, crypto->digest_len); + sha1_update(ctx, crypto->secret_hash, crypto->digest_len); sha1_final(hash, ctx); #ifdef DEBUG_CRYPTO |