diff options
-rw-r--r-- | paramiko/kex_gss.py | 6 | ||||
-rw-r--r-- | paramiko/transport.py | 1 |
2 files changed, 5 insertions, 2 deletions
diff --git a/paramiko/kex_gss.py b/paramiko/kex_gss.py index 3406babb..04906abd 100644 --- a/paramiko/kex_gss.py +++ b/paramiko/kex_gss.py @@ -83,7 +83,6 @@ class KexGSSGroup1(object): """ Start the GSS-API / SSPI Authenticated Diffie-Hellman Key Exchange. """ - self.transport.gss_kex_used = True self._generate_x() if self.transport.server_mode: # compute f = g^x mod p, but don't send it yet @@ -216,6 +215,7 @@ class KexGSSGroup1(object): else: self.kexgss.ssh_check_mic(mic_token, self.transport.session_id) + self.transport.gss_kex_used = True self.transport._activate_outbound() def _parse_kexgss_init(self, m): @@ -258,6 +258,7 @@ class KexGSSGroup1(object): else: m.add_boolean(False) self.transport._send_message(m) + self.transport.gss_kex_used = True self.transport._activate_outbound() else: m.add_byte(c_MSG_KEXGSS_CONTINUE) @@ -325,7 +326,6 @@ class KexGSSGex(object): """ Start the GSS-API / SSPI Authenticated Diffie-Hellman Group Exchange """ - self.transport.gss_kex_used = True if self.transport.server_mode: self.transport._expect_packet(MSG_KEXGSS_GROUPREQ) return @@ -501,6 +501,7 @@ class KexGSSGex(object): else: m.add_boolean(False) self.transport._send_message(m) + self.transport.gss_kex_used = True self.transport._activate_outbound() else: m.add_byte(c_MSG_KEXGSS_CONTINUE) @@ -587,6 +588,7 @@ class KexGSSGex(object): else: self.kexgss.ssh_check_mic(mic_token, self.transport.session_id) + self.transport.gss_kex_used = True self.transport._activate_outbound() def _parse_kexgss_error(self, m): diff --git a/paramiko/transport.py b/paramiko/transport.py index bab23fa1..ffcf6f05 100644 --- a/paramiko/transport.py +++ b/paramiko/transport.py @@ -1992,6 +1992,7 @@ class Transport(threading.Thread, ClosingContextManager): self.clear_to_send.clear() finally: self.clear_to_send_lock.release() + self.gss_kex_used = False self.in_kex = True if self.server_mode: mp_required_prefix = 'diffie-hellman-group-exchange-sha' |