summaryrefslogtreecommitdiff
path: root/cipher.c
diff options
context:
space:
mode:
authordtucker <dtucker>2005-01-24 10:57:11 +0000
committerdtucker <dtucker>2005-01-24 10:57:11 +0000
commit150f049af8c888474b56de8d7d3a386c246622a1 (patch)
tree0d406c9b6b034fa7f0496462061ac226ef5166ae /cipher.c
parent03063303c328f9a5112de338c9bc40cf3a4d9119 (diff)
downloadopenssh-150f049af8c888474b56de8d7d3a386c246622a1.tar.gz
- 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 64be0571..beba4618 100644
--- a/cipher.c
+++ b/cipher.c
@@ -35,7 +35,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: cipher.c,v 1.72 2004/12/22 02:13:19 djm Exp $");
+RCSID("$OpenBSD: cipher.c,v 1.73 2005/01/23 10:18:12 djm Exp $");
#include "xmalloc.h"
#include "log.h"
@@ -146,7 +146,7 @@ cipher_by_name(const char *name)
{
Cipher *c;
for (c = ciphers; c->name != NULL; c++)
- if (strcasecmp(c->name, name) == 0)
+ if (strcmp(c->name, name) == 0)
return c;
return NULL;
}
@@ -199,8 +199,10 @@ cipher_number(const char *name)
Cipher *c;
if (name == NULL)
return -1;
- c = cipher_by_name(name);
- return (c==NULL) ? -1 : c->number;
+ for (c = ciphers; c->name != NULL; c++)
+ if (strcasecmp(c->name, name) == 0)
+ return c->number;
+ return -1;
}
char *