[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() keyblob = m.get_string()
try: try:
key = self._key_info[keytype](Message(keyblob)) key = self._key_info[keytype](Message(keyblob))
except: except SSHException, e:
self._log(DEBUG, 'Auth rejected: public key: %s' % str(e))
key = None key = None
if (key is None) or (not key.valid): except:
self._log(DEBUG, 'Auth rejected: unsupported or mangled public key') self._log(DEBUG, 'Auth rejected: unsupported or mangled public key')
key = None
if key is None:
self._disconnect_no_more_auth() self._disconnect_no_more_auth()
return return
# first check if this key is okay... if not, we can skip the verify # first check if this key is okay... if not, we can skip the verify