summaryrefslogtreecommitdiff
path: root/usr.bin/ssh
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2021-12-02 23:45:37 +0000
committerDamien Miller <djm@cvs.openbsd.org>2021-12-02 23:45:37 +0000
commitb6d1d16d03dbe55fc0413f09136b80e90a4a7e8a (patch)
tree1b84312b3169bdf8acbddc014a51163954a7e8e4 /usr.bin/ssh
parent7fd3fdb9f334b5cb6e4e6d16d3008cdacde23100 (diff)
hash full host:port when asked to hash output, fixes hashes for non-
default ports. bz3367 ok dtucker@
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r--usr.bin/ssh/ssh-keyscan.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/ssh-keyscan.c b/usr.bin/ssh/ssh-keyscan.c
index e3acfe018ed..356467dca8a 100644
--- a/usr.bin/ssh/ssh-keyscan.c
+++ b/usr.bin/ssh/ssh-keyscan.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-keyscan.c,v 1.143 2021/11/18 03:31:44 djm Exp $ */
+/* $OpenBSD: ssh-keyscan.c,v 1.144 2021/12/02 23:45:36 djm Exp $ */
/*
* Copyright 1995, 1996 by David Mazieres <dm@lcs.mit.edu>.
*
@@ -299,7 +299,7 @@ keyprint_one(const char *host, struct sshkey *key)
hostport = put_host_port(host, ssh_port);
lowercase(hostport);
- if (hash_hosts && (hashed = host_hash(host, NULL, 0)) == NULL)
+ if (hash_hosts && (hashed = host_hash(hostport, NULL, 0)) == NULL)
fatal("host_hash failed");
known_host = hash_hosts ? hashed : hostport;
if (!get_cert)