Store hostname hashes in memory rathen than the non-hashed host entries. Also assures that the host entries in known_hosts get saved in hashed format as it is currently standard in OpenSSH.
This commit is contained in:
parent
b329512636
commit
4f481a57a2
|
@ -141,6 +141,8 @@ class HostKeys (UserDict.DictMixin):
|
|||
if (hostname in e.hostnames) and (e.key.get_name() == keytype):
|
||||
e.key = key
|
||||
return
|
||||
if not hostname.startswith('|1|') and hash_hostname:
|
||||
hostname = self.hash_host(hostname)
|
||||
self._entries.append(HostKeyEntry([hostname], key))
|
||||
|
||||
def load(self, filename):
|
||||
|
|
Loading…
Reference in New Issue