From 44d07583bb08f97a1859908d2ae4fdab77f3d9bc Mon Sep 17 00:00:00 2001 From: Robey Pointer Date: Mon, 1 Nov 2004 03:37:42 +0000 Subject: [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. --- paramiko/auth_transport.py | 7 +++++-- 1 file 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 -- cgit v1.2.3