summaryrefslogtreecommitdiff
path: root/cipher.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-07-11 17:31:38 +1000
committerDamien Miller <djm@mindrot.org>2000-07-11 17:31:38 +1000
commit3702396526a2569402696ff7d7c6d0fe2e5a447b (patch)
tree3ab056c59cd0c732ec179bd91be88d4e05b087fa /cipher.c
parentbc33bd44a2ef165dea1d974fc2d80b822ae08c2a (diff)
- (djm) OpenBSD CVS updates:
- markus@cvs.openbsd.org 2000/06/26 03:22:29 [authfd.c] cleanup, less cut&paste - markus@cvs.openbsd.org 2000/06/26 15:59:19 [servconf.c servconf.h session.c sshd.8 sshd.c] MaxStartups: limit number of unauthenticated connections, work by theo and me - deraadt@cvs.openbsd.org 2000/07/05 14:18:07 [session.c] use no_x11_forwarding_flag correctly; provos ok - provos@cvs.openbsd.org 2000/07/05 15:35:57 [sshd.c] typo - aaron@cvs.openbsd.org 2000/07/05 22:06:58 [scp.1 ssh-agent.1 ssh-keygen.1 sshd.8] Insert more missing .El directives. Our troff really should identify these and spit out a warning. - todd@cvs.openbsd.org 2000/07/06 21:55:04 [auth-rsa.c auth2.c ssh-keygen.c] clean code is good code - deraadt@cvs.openbsd.org 2000/07/07 02:14:29 [serverloop.c] sense of port forwarding flag test was backwards - provos@cvs.openbsd.org 2000/07/08 17:17:31 [compat.c readconf.c] replace strtok with strsep; from David Young <dyoung@onthejob.net> - deraadt@cvs.openbsd.org 2000/07/08 19:21:15 [auth.h] KNF - ho@cvs.openbsd.org 2000/07/08 19:27:33 [compat.c readconf.c] Better conditions for strsep() ending. - ho@cvs.openbsd.org 2000/07/10 10:27:05 [readconf.c] Get the correct message on errors. (niels@ ok) - ho@cvs.openbsd.org 2000/07/10 10:30:25 [cipher.c kex.c servconf.c] strtok() --> strsep(). (niels@ ok)
Diffstat (limited to 'cipher.c')
-rw-r--r--cipher.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/cipher.c b/cipher.c
index 97cbd38ca..a44e51d98 100644
--- a/cipher.c
+++ b/cipher.c
@@ -12,7 +12,7 @@
12 */ 12 */
13 13
14#include "includes.h" 14#include "includes.h"
15RCSID("$OpenBSD: cipher.c,v 1.28 2000/06/20 01:39:40 markus Exp $"); 15RCSID("$OpenBSD: cipher.c,v 1.29 2000/07/10 16:30:25 ho Exp $");
16 16
17#include "ssh.h" 17#include "ssh.h"
18#include "cipher.h" 18#include "cipher.h"
@@ -174,14 +174,15 @@ cipher_name(int cipher)
174int 174int
175ciphers_valid(const char *names) 175ciphers_valid(const char *names)
176{ 176{
177 char *ciphers; 177 char *ciphers, *cp;
178 char *p; 178 char *p;
179 int i; 179 int i;
180 180
181 if (names == NULL || strcmp(names, "") == 0) 181 if (names == NULL || strcmp(names, "") == 0)
182 return 0; 182 return 0;
183 ciphers = xstrdup(names); 183 ciphers = cp = xstrdup(names);
184 for ((p = strtok(ciphers, CIPHER_SEP)); p; (p = strtok(NULL, CIPHER_SEP))) { 184 for ((p = strsep(&cp, CIPHER_SEP)); p && *p != '\0';
185 (p = strsep(&cp, CIPHER_SEP))) {
185 i = cipher_number(p); 186 i = cipher_number(p);
186 if (i == -1 || !(cipher_mask2() & (1 << i))) { 187 if (i == -1 || !(cipher_mask2() & (1 << i))) {
187 xfree(ciphers); 188 xfree(ciphers);