summaryrefslogtreecommitdiff
path: root/sshkey.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2016-09-12 23:31:27 +0000
committerDamien Miller <djm@mindrot.org>2016-09-13 09:33:24 +1000
commit130f5df4fa37cace8c079dccb690e5cafbf00751 (patch)
tree6be59a00f7c45be11ffc8d40fa79a7c4a57e0a2f /sshkey.c
parent8f750ccfc07acb8aa98be5a5dd935033a6468cfd (diff)
upstream commit
list all supported signature algorithms in the server-sig-algs Reported by mb AT smartftp.com in bz#2547 and (independantly) Ron Frederick; ok markus@ Upstream-ID: ddf702d721f54646b11ef2cee6d916666cb685cd
Diffstat (limited to 'sshkey.c')
-rw-r--r--sshkey.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sshkey.c b/sshkey.c
index 8f6173e27..e6df94aaa 100644
--- a/sshkey.c
+++ b/sshkey.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshkey.c,v 1.37 2016/09/12 01:22:38 deraadt Exp $ */ 1/* $OpenBSD: sshkey.c,v 1.38 2016/09/12 23:31:27 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
4 * Copyright (c) 2008 Alexander von Gernler. All rights reserved. 4 * Copyright (c) 2008 Alexander von Gernler. All rights reserved.
@@ -195,7 +195,7 @@ sshkey_ecdsa_nid_from_name(const char *name)
195} 195}
196 196
197char * 197char *
198key_alg_list(int certs_only, int plain_only) 198sshkey_alg_list(int certs_only, int plain_only, char sep)
199{ 199{
200 char *tmp, *ret = NULL; 200 char *tmp, *ret = NULL;
201 size_t nlen, rlen = 0; 201 size_t nlen, rlen = 0;
@@ -207,7 +207,7 @@ key_alg_list(int certs_only, int plain_only)
207 if ((certs_only && !kt->cert) || (plain_only && kt->cert)) 207 if ((certs_only && !kt->cert) || (plain_only && kt->cert))
208 continue; 208 continue;
209 if (ret != NULL) 209 if (ret != NULL)
210 ret[rlen++] = '\n'; 210 ret[rlen++] = sep;
211 nlen = strlen(kt->name); 211 nlen = strlen(kt->name);
212 if ((tmp = realloc(ret, rlen + nlen + 2)) == NULL) { 212 if ((tmp = realloc(ret, rlen + nlen + 2)) == NULL) {
213 free(ret); 213 free(ret);