summaryrefslogtreecommitdiffhomepage
path: root/demo.py
diff options
context:
space:
mode:
authorRobey Pointer <robey@lag.net>2004-04-05 22:32:03 +0000
committerRobey Pointer <robey@lag.net>2004-04-05 22:32:03 +0000
commited72847ad1e392af6bb8920176c30548c68ddb23 (patch)
tree143a7b196964ab1bd4170a2fb1a781d8b1f46ebf /demo.py
parentc6d5ba9c5225b119bd718b4fbc1523dc9b3a3926 (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-xdemo.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/demo.py b/demo.py
index 3a642289..c9dd5014 100755
--- a/demo.py
+++ b/demo.py
@@ -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: