diff options
Diffstat (limited to 'cipher.c')
-rw-r--r-- | cipher.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: cipher.c,v 1.89 2013/05/17 00:13:13 djm Exp $ */ | 1 | /* $OpenBSD: cipher.c,v 1.90 2013/11/07 11:58:27 dtucker Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -100,9 +100,9 @@ static const struct Cipher ciphers[] = { | |||
100 | 100 | ||
101 | /*--*/ | 101 | /*--*/ |
102 | 102 | ||
103 | /* Returns a comma-separated list of supported ciphers. */ | 103 | /* Returns a list of supported ciphers separated by the specified char. */ |
104 | char * | 104 | char * |
105 | cipher_alg_list(void) | 105 | cipher_alg_list(char sep) |
106 | { | 106 | { |
107 | char *ret = NULL; | 107 | char *ret = NULL; |
108 | size_t nlen, rlen = 0; | 108 | size_t nlen, rlen = 0; |
@@ -112,7 +112,7 @@ cipher_alg_list(void) | |||
112 | if (c->number != SSH_CIPHER_SSH2) | 112 | if (c->number != SSH_CIPHER_SSH2) |
113 | continue; | 113 | continue; |
114 | if (ret != NULL) | 114 | if (ret != NULL) |
115 | ret[rlen++] = '\n'; | 115 | ret[rlen++] = sep; |
116 | nlen = strlen(c->name); | 116 | nlen = strlen(c->name); |
117 | ret = xrealloc(ret, 1, rlen + nlen + 2); | 117 | ret = xrealloc(ret, 1, rlen + nlen + 2); |
118 | memcpy(ret + rlen, c->name, nlen + 1); | 118 | memcpy(ret + rlen, c->name, nlen + 1); |