summaryrefslogtreecommitdiff
path: root/paramiko/hostkeys.py
diff options
context:
space:
mode:
authorJeremy T. Bouse <jbouse@debian.org>2014-08-28 22:23:07 -0700
committerJeremy T. Bouse <jbouse@debian.org>2014-08-28 22:23:07 -0700
commit588a4823436454e8968ee36ae95ff92e1cddc3f7 (patch)
treee4a22fe9360117ca8d4d85d9628d7581a57ac97c /paramiko/hostkeys.py
parent4e426087436d01fe00a120e5e7ce7a5e0a1e0970 (diff)
downloadpython-paramiko-588a4823436454e8968ee36ae95ff92e1cddc3f7.tar
python-paramiko-588a4823436454e8968ee36ae95ff92e1cddc3f7.tar.gz
Imported Upstream version 1.14.1upstream/1.14.1
Diffstat (limited to 'paramiko/hostkeys.py')
-rw-r--r--paramiko/hostkeys.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/paramiko/hostkeys.py b/paramiko/hostkeys.py
index c0caeda..cd65e77 100644
--- a/paramiko/hostkeys.py
+++ b/paramiko/hostkeys.py
@@ -179,7 +179,7 @@ class HostKeys (MutableMapping):
entries = []
for e in self._entries:
for h in e.hostnames:
- if h.startswith('|1|') and constant_time_bytes_eq(self.hash_host(hostname, h), h) or h == hostname:
+ if h.startswith('|1|') and not hostname.startswith('|1|') and constant_time_bytes_eq(self.hash_host(hostname, h), h) or h == hostname:
entries.append(e)
if len(entries) == 0:
return None