summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRobey Pointer <robey@lag.net>2004-11-01 03:37:42 +0000
committerRobey Pointer <robey@lag.net>2004-11-01 03:37:42 +0000
commit44d07583bb08f97a1859908d2ae4fdab77f3d9bc (patch)
tree997512b64c14fdb21c5bf376f43556efbe221f23
parenta73413c5886dd411aeb65c941797516c8bc240a4 (diff)
[project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-96]
remove key.valid check oops! 'key.valid' no longer works -- catch the SSHException instead, and log it.
-rw-r--r--paramiko/auth_transport.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/paramiko/auth_transport.py b/paramiko/auth_transport.py
index 958cd408..ba0cbec8 100644
--- a/paramiko/auth_transport.py
+++ b/paramiko/auth_transport.py
@@ -276,10 +276,13 @@ class Transport (BaseTransport):
keyblob = m.get_string()
try:
key = self._key_info[keytype](Message(keyblob))
- except:
+ except SSHException, e:
+ self._log(DEBUG, 'Auth rejected: public key: %s' % str(e))
key = None
- if (key is None) or (not key.valid):
+ except:
self._log(DEBUG, 'Auth rejected: unsupported or mangled public key')
+ key = None
+ if key is None:
self._disconnect_no_more_auth()
return
# first check if this key is okay... if not, we can skip the verify