]> andersk Git - gssapi-openssh.git/blobdiff - openssh/cipher.c
Import of OpenSSH 4.0p1
[gssapi-openssh.git] / openssh / cipher.c
index 075a4c5fceb0bda3426f63d75bae2dfc5879dba5..beba4618dc82d2912fffd2ec32066734a8b59325 100644 (file)
@@ -35,7 +35,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: cipher.c,v 1.71 2004/07/28 09:40:29 markus 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 *
This page took 0.034549 seconds and 4 git commands to generate.