mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-12-02 01:17:52 +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:
committed by
Andreas Schneider
parent
b26ca652f5
commit
1be9618f4e
@@ -745,7 +745,7 @@ int ssh_set_client_kex(ssh_session session)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* For rekeying, skip the extension negotiation */
|
/* For rekeying, skip the extension negotiation */
|
||||||
if (session->session_state == SSH_SESSION_STATE_AUTHENTICATED) {
|
if (session->flags & SSH_SESSION_FLAG_AUTHENTICATED) {
|
||||||
return SSH_OK;
|
return SSH_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user