summaryrefslogtreecommitdiff
path: root/ssh-keyscan.c
diff options
context:
space:
mode:
Diffstat (limited to 'ssh-keyscan.c')
-rw-r--r--ssh-keyscan.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/ssh-keyscan.c b/ssh-keyscan.c
index 24b51ff12..1f95239a3 100644
--- a/ssh-keyscan.c
+++ b/ssh-keyscan.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-keyscan.c,v 1.106 2016/05/02 10:26:04 djm Exp $ */ 1/* $OpenBSD: ssh-keyscan.c,v 1.109 2017/03/10 04:26:06 djm Exp $ */
2/* 2/*
3 * Copyright 1995, 1996 by David Mazieres <dm@lcs.mit.edu>. 3 * Copyright 1995, 1996 by David Mazieres <dm@lcs.mit.edu>.
4 * 4 *
@@ -327,6 +327,7 @@ keyprint_one(const char *host, struct sshkey *key)
327 const char *known_host, *hashed; 327 const char *known_host, *hashed;
328 328
329 hostport = put_host_port(host, ssh_port); 329 hostport = put_host_port(host, ssh_port);
330 lowercase(hostport);
330 if (hash_hosts && (hashed = host_hash(host, NULL, 0)) == NULL) 331 if (hash_hosts && (hashed = host_hash(host, NULL, 0)) == NULL)
331 fatal("host_hash failed"); 332 fatal("host_hash failed");
332 known_host = hash_hosts ? hashed : hostport; 333 known_host = hash_hosts ? hashed : hostport;
@@ -753,10 +754,13 @@ main(int argc, char **argv)
753 tname = strtok(optarg, ","); 754 tname = strtok(optarg, ",");
754 while (tname) { 755 while (tname) {
755 int type = sshkey_type_from_name(tname); 756 int type = sshkey_type_from_name(tname);
757
756 switch (type) { 758 switch (type) {
759#ifdef WITH_SSH1
757 case KEY_RSA1: 760 case KEY_RSA1:
758 get_keytypes |= KT_RSA1; 761 get_keytypes |= KT_RSA1;
759 break; 762 break;
763#endif
760 case KEY_DSA: 764 case KEY_DSA:
761 get_keytypes |= KT_DSA; 765 get_keytypes |= KT_DSA;
762 break; 766 break;
@@ -770,7 +774,8 @@ main(int argc, char **argv)
770 get_keytypes |= KT_ED25519; 774 get_keytypes |= KT_ED25519;
771 break; 775 break;
772 case KEY_UNSPEC: 776 case KEY_UNSPEC:
773 fatal("unknown key type %s", tname); 777 default:
778 fatal("Unknown key type \"%s\"", tname);
774 } 779 }
775 tname = strtok(NULL, ","); 780 tname = strtok(NULL, ",");
776 } 781 }