summaryrefslogtreecommitdiff
path: root/cipher.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2005-01-24 21:57:11 +1100
committerDarren Tucker <dtucker@zip.com.au>2005-01-24 21:57:11 +1100
commit660db78af227f26c6e1ee4ca795400cd7b8ac056 (patch)
tree5009ad423edb541d2194f9a91f34c2121426d7c4 /cipher.c
parent094cd0ba02a3a29f170227dc0219e08c006c9b86 (diff)
- djm@cvs.openbsd.org 2005/01/23 10:18:12
[cipher.c] config option "Ciphers" should be case-sensitive; ok dtucker@
Diffstat (limited to 'cipher.c')
-rw-r--r--cipher.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/cipher.c b/cipher.c
index 64be0571f..beba4618d 100644
--- a/cipher.c
+++ b/cipher.c
@@ -35,7 +35,7 @@
35 */ 35 */
36 36
37#include "includes.h" 37#include "includes.h"
38RCSID("$OpenBSD: cipher.c,v 1.72 2004/12/22 02:13:19 djm Exp $"); 38RCSID("$OpenBSD: cipher.c,v 1.73 2005/01/23 10:18:12 djm Exp $");
39 39
40#include "xmalloc.h" 40#include "xmalloc.h"
41#include "log.h" 41#include "log.h"
@@ -146,7 +146,7 @@ cipher_by_name(const char *name)
146{ 146{
147 Cipher *c; 147 Cipher *c;
148 for (c = ciphers; c->name != NULL; c++) 148 for (c = ciphers; c->name != NULL; c++)
149 if (strcasecmp(c->name, name) == 0) 149 if (strcmp(c->name, name) == 0)
150 return c; 150 return c;
151 return NULL; 151 return NULL;
152} 152}
@@ -199,8 +199,10 @@ cipher_number(const char *name)
199 Cipher *c; 199 Cipher *c;
200 if (name == NULL) 200 if (name == NULL)
201 return -1; 201 return -1;
202 c = cipher_by_name(name); 202 for (c = ciphers; c->name != NULL; c++)
203 return (c==NULL) ? -1 : c->number; 203 if (strcasecmp(c->name, name) == 0)
204 return c->number;
205 return -1;
204} 206}
205 207
206char * 208char *