summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2010-05-01 16:52:46 +0200
committerAris Adamantiadis <aris@0xbadc0de.be>2010-05-07 13:02:28 +0200
commit476630841fe6e2068753ab6eebfb69859ee22893 (patch)
treec3b531b619542b18cc5b16d9ae852f134fab8bd6
parent7f59662cade9e22d529d731fc3b403d04adc2fb9 (diff)
Match hashed [host]:port format knownhosts
-rw-r--r--libssh/keyfiles.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libssh/keyfiles.c b/libssh/keyfiles.c
index 7be2d99e..af748046 100644
--- a/libssh/keyfiles.c
+++ b/libssh/keyfiles.c
@@ -1618,6 +1618,9 @@ int ssh_is_server_known(ssh_session session) {
if (match == 0) {
match = match_hostname(host, tokens[0], strlen(tokens[0]));
}
+ if (match == 0) {
+ match = match_hashed_host(session, hostport, tokens[0]);
+ }
if (match) {
/* We got a match. Now check the key type */
if (strcmp(session->current_crypto->server_pubkey_type, type) != 0) {