summaryrefslogtreecommitdiffhomepage
path: root/paramiko/transport.py
diff options
context:
space:
mode:
Diffstat (limited to 'paramiko/transport.py')
-rw-r--r--paramiko/transport.py27
1 files changed, 13 insertions, 14 deletions
diff --git a/paramiko/transport.py b/paramiko/transport.py
index 75f3ef75..c352246c 100644
--- a/paramiko/transport.py
+++ b/paramiko/transport.py
@@ -228,6 +228,7 @@ class Transport (threading.Thread, ClosingContextManager):
}
_modulus_pack = None
+ _active_check_timeout = 0.1
def __init__(self,
sock,
@@ -315,7 +316,7 @@ class Transport (threading.Thread, ClosingContextManager):
# we set the timeout so we can check self.active periodically to
# see if we should bail. socket.timeout exception is never
# propagated.
- self.sock.settimeout(0.1)
+ self.sock.settimeout(self._active_check_timeout)
except AttributeError:
pass
@@ -1427,20 +1428,18 @@ class Transport (threading.Thread, ClosingContextManager):
def auth_gssapi_keyex(self, username):
"""
- Authenticate to the Server with GSS-API / SSPI if GSS-API Key Exchange
- was the used key exchange method.
+ Authenticate to the server with GSS-API/SSPI if GSS-API kex is in use.
- :param str username: The username to authenticate as
- :param str gss_host: The target host
- :param bool gss_deleg_creds: Delegate credentials or not
- :return: list of auth types permissible for the next stage of
- authentication (normally empty)
- :rtype: list
- :raise BadAuthenticationType: if GSS-API Key Exchange was not performed
- (and no event was passed in)
- :raise AuthenticationException: if the authentication failed (and no
- event was passed in)
- :raise SSHException: if there was a network error
+ :param str username: The username to authenticate as.
+ :returns:
+ a `list` of auth types permissible for the next stage of
+ authentication (normally empty)
+ :raises BadAuthenticationType:
+ if GSS-API Key Exchange was not performed (and no event was passed
+ in)
+ :raises AuthenticationException:
+ if the authentication failed (and no event was passed in)
+ :raises SSHException: if there was a network error
"""
if (not self.active) or (not self.initial_kex_done):
# we should never try to authenticate unless we're on a secure link