diff options
Diffstat (limited to 'paramiko/hostkeys.py')
-rw-r--r-- | paramiko/hostkeys.py | 2 |
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 |