[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.
This commit is contained in:
Robey Pointer 2004-11-01 03:37:42 +00:00
parent a73413c588
commit 44d07583bb
1 changed files with 5 additions and 2 deletions

View File

@ -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