1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-30 13:01:23 +03:00

kex: Correctly check for the rekey (amends 83f2ac4a)

This is more reliable fix than 83f2ac4a, which was failing for the
server initialized rekeying, because the session_state is altered
by receiving the KEXINIT from server.

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Jakub Jelen
2018-12-11 20:03:30 +01:00
committed by Andreas Schneider
parent b26ca652f5
commit 1be9618f4e

View File

@@ -745,7 +745,7 @@ int ssh_set_client_kex(ssh_session session)
}
/* For rekeying, skip the extension negotiation */
if (session->session_state == SSH_SESSION_STATE_AUTHENTICATED) {
if (session->flags & SSH_SESSION_FLAG_AUTHENTICATED) {
return SSH_OK;
}