summaryrefslogtreecommitdiff
path: root/usr.bin/ssh
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2017-01-06 03:41:59 +0000
committerDamien Miller <djm@cvs.openbsd.org>2017-01-06 03:41:59 +0000
commitd7992c2f588ffb0a9a5c7579f52551bf9b12ebfd (patch)
tree73f4437b7380e4af1a59a408edb5239a1adcdef0 /usr.bin/ssh
parentd225db0428bc13587e68331c696f94b2af16ef6d (diff)
Avoid confusing error message when attempting to use ssh-keyscan built
without SSH protocol v.1 to scan for v.1 keys; bz#2583
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r--usr.bin/ssh/ssh-keyscan.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/ssh/ssh-keyscan.c b/usr.bin/ssh/ssh-keyscan.c
index ee52a2bedaa..9f9ec9b6466 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.106 2016/05/02 10:26:04 djm Exp $ */
+/* $OpenBSD: ssh-keyscan.c,v 1.107 2017/01/06 03:41:58 djm Exp $ */
/*
* Copyright 1995, 1996 by David Mazieres <dm@lcs.mit.edu>.
*
@@ -730,10 +730,13 @@ main(int argc, char **argv)
tname = strtok(optarg, ",");
while (tname) {
int type = sshkey_type_from_name(tname);
+
switch (type) {
+#ifdef WITH_SSH1
case KEY_RSA1:
get_keytypes |= KT_RSA1;
break;
+#endif
case KEY_DSA:
get_keytypes |= KT_DSA;
break;
@@ -747,7 +750,8 @@ main(int argc, char **argv)
get_keytypes |= KT_ED25519;
break;
case KEY_UNSPEC:
- fatal("unknown key type %s", tname);
+ default:
+ fatal("Unknown key type \"%s\"", tname);
}
tname = strtok(NULL, ",");
}