summaryrefslogtreecommitdiff
path: root/ssh.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2018-09-12 01:30:10 +0000
committerDamien Miller <djm@mindrot.org>2018-09-12 16:49:21 +1000
commit357128ac48630a9970e3af0e6ff820300a28da47 (patch)
treee11faeddd0368f69589bb6151d8afa71b54b27ed /ssh.c
parent9405c6214f667be604a820c6823b27d0ea77937d (diff)
upstream: Add "ssh -Q sig" to allow listing supported signature
algorithms ok markus@ OpenBSD-Commit-ID: 7a8c6eb6c249dc37823ba5081fce64876d10fe2b
Diffstat (limited to 'ssh.c')
-rw-r--r--ssh.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/ssh.c b/ssh.c
index ce628848..3307a5e3 100644
--- a/ssh.c
+++ b/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
@@ -739,8 +739,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);