summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/ssh.c
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2018-09-12 01:30:10 +0000
committerdjm <djm@openbsd.org>2018-09-12 01:30:10 +0000
commit098cb50c275b182ba8027517f7c28f76d229e427 (patch)
tree8cf9d1d009a336f3c0bed59bcc275e588f8cad38 /usr.bin/ssh/ssh.c
parenttest revocation by explicit hash and by fingerprint (diff)
downloadwireguard-openbsd-098cb50c275b182ba8027517f7c28f76d229e427.tar.xz
wireguard-openbsd-098cb50c275b182ba8027517f7c28f76d229e427.zip
Add "ssh -Q sig" to allow listing supported signature algorithms
ok markus@
Diffstat (limited to 'usr.bin/ssh/ssh.c')
-rw-r--r--usr.bin/ssh/ssh.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c
index 2f0bf28b7e0..371be2e9fc4 100644
--- a/usr.bin/ssh/ssh.c
+++ b/usr.bin/ssh/ssh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh.c,v 1.490 2018/07/27 05:34:42 dtucker Exp $ */
+/* $OpenBSD: ssh.c,v 1.491 2018/09/12 01:30:10 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -715,8 +715,15 @@ main(int ac, char **av)
cp = sshkey_alg_list(1, 0, 0, '\n');
else if (strcmp(optarg, "key-plain") == 0)
cp = sshkey_alg_list(0, 1, 0, '\n');
- else if (strcmp(optarg, "protocol-version") == 0) {
+ else if (strcmp(optarg, "sig") == 0)
+ cp = sshkey_alg_list(0, 0, 1, '\n');
+ else if (strcmp(optarg, "protocol-version") == 0)
cp = xstrdup("2");
+ else if (strcmp(optarg, "help") == 0) {
+ cp = xstrdup(
+ "cipher\ncipher-auth\nkex\nkey\n"
+ "key-cert\nkey-plain\nmac\n"
+ "protocol-version\nsig");
}
if (cp == NULL)
fatal("Unsupported query \"%s\"", optarg);