summaryrefslogtreecommitdiffstats
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
parent094cd0ba02a3a29f170227dc0219e08c006c9b86 (diff)
- djm@cvs.openbsd.org 2005/01/23 10:18:12
[cipher.c] config option "Ciphers" should be case-sensitive; ok dtucker@
-rw-r--r--ChangeLog5
-rw-r--r--cipher.c10
2 files changed, 10 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index fa31ec3a..d271cf5e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,9 @@
[auth.c]
Log source of connections denied by AllowUsers, DenyUsers, AllowGroups and
DenyGroups. bz #909, ok djm@
+ - djm@cvs.openbsd.org 2005/01/23 10:18:12
+ [cipher.c]
+ config option "Ciphers" should be case-sensitive; ok dtucker@
20050120
- (dtucker) OpenBSD CVS Sync
@@ -2027,4 +2030,4 @@
- (djm) Trim deprecated options from INSTALL. Mention UsePAM
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
-$Id: ChangeLog,v 1.3622 2005/01/24 10:56:48 dtucker Exp $
+$Id: ChangeLog,v 1.3623 2005/01/24 10:57:11 dtucker Exp $
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 *