diff options
author | Robey Pointer <robey@lag.net> | 2004-04-05 22:32:03 +0000 |
---|---|---|
committer | Robey Pointer <robey@lag.net> | 2004-04-05 22:32:03 +0000 |
commit | ed72847ad1e392af6bb8920176c30548c68ddb23 (patch) | |
tree | 143a7b196964ab1bd4170a2fb1a781d8b1f46ebf /demo.py | |
parent | c6d5ba9c5225b119bd718b4fbc1523dc9b3a3926 (diff) |
[project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-41]
make get_remote_server_key() return a PKey object
a good suggestion from roger binns: make get_remote_server_key() just return
a pkey object instead of a tuple of strings. all the strings can be extracted
from the pkey object, as well as other potentially useful things.
Diffstat (limited to 'demo.py')
-rwxr-xr-x | demo.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -70,12 +70,12 @@ try: # print repr(t) keys = load_host_keys() - keytype, hostkey = t.get_remote_server_key() + key = t.get_remote_server_key() if not keys.has_key(hostname): print '*** WARNING: Unknown host key!' - elif not keys[hostname].has_key(keytype): + elif not keys[hostname].has_key(key.get_name()): print '*** WARNING: Unknown host key!' - elif keys[hostname][keytype] != hostkey: + elif keys[hostname][key.get_name()] != str(key): print '*** WARNING: Host key has changed!!!' sys.exit(1) else: |