diff options
author | 2017-03-10 04:07:20 +0000 | |
---|---|---|
committer | 2017-03-10 04:07:20 +0000 | |
commit | 46f459699014579c32838d7e0b011852ca8f02ed (patch) | |
tree | fd3da0cd33e8b9c0d06c92e27af0ab8d63810a25 /usr.bin/ssh/sshkey.c | |
parent | Check for NULL return value from key_new. Patch from jjelen at redhat.com (diff) | |
download | wireguard-openbsd-46f459699014579c32838d7e0b011852ca8f02ed.tar.xz wireguard-openbsd-46f459699014579c32838d7e0b011852ca8f02ed.zip |
fix regression in 7.4 server-sig-algs, where we were accidentally
excluding SHA2 RSA signature methods. bz#2680, patch from Nuno
Goncalves; ok dtucker@
Diffstat (limited to 'usr.bin/ssh/sshkey.c')
-rw-r--r-- | usr.bin/ssh/sshkey.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/ssh/sshkey.c b/usr.bin/ssh/sshkey.c index 11e440fd2fa..f0f54df80d5 100644 --- a/usr.bin/ssh/sshkey.c +++ b/usr.bin/ssh/sshkey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshkey.c,v 1.44 2017/03/10 03:48:57 dtucker Exp $ */ +/* $OpenBSD: sshkey.c,v 1.45 2017/03/10 04:07:20 djm Exp $ */ /* * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. * Copyright (c) 2008 Alexander von Gernler. All rights reserved. @@ -185,14 +185,16 @@ sshkey_ecdsa_nid_from_name(const char *name) } char * -sshkey_alg_list(int certs_only, int plain_only, char sep) +sshkey_alg_list(int certs_only, int plain_only, int include_sigonly, char sep) { char *tmp, *ret = NULL; size_t nlen, rlen = 0; const struct keytype *kt; for (kt = keytypes; kt->type != -1; kt++) { - if (kt->name == NULL || kt->sigonly) + if (kt->name == NULL) + continue; + if (!include_sigonly && kt->sigonly) continue; if ((certs_only && !kt->cert) || (plain_only && kt->cert)) continue; |