diff options
author | pjd <pjd@FreeBSD.org> | 2005-08-08 19:40:38 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2005-08-08 19:40:38 +0000 |
commit | 540e708ef59e78a3e053a16463d855a75422f2bc (patch) | |
tree | e44dfc38de05dcff1ffba17c9a0f2c64025746ee /sys/geom | |
parent | 25b64347ef7f1d494d205e8b71f9b99e2848f5ac (diff) | |
download | FreeBSD-src-540e708ef59e78a3e053a16463d855a75422f2bc.zip FreeBSD-src-540e708ef59e78a3e053a16463d855a75422f2bc.tar.gz |
Be case-insensitive when dealing with algorithm names.
PR: kern/84659
Submitted by: Benjamin Lutz <benlutz@datacomm.ch>
Diffstat (limited to 'sys/geom')
-rw-r--r-- | sys/geom/eli/g_eli.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/geom/eli/g_eli.h b/sys/geom/eli/g_eli.h index 62bee40..b560f85 100644 --- a/sys/geom/eli/g_eli.h +++ b/sys/geom/eli/g_eli.h @@ -41,6 +41,7 @@ #else #include <stdio.h> #include <string.h> +#include <strings.h> #endif #ifndef _OpenSSL_ #include <sys/md5.h> @@ -223,13 +224,13 @@ static __inline u_int g_eli_str2algo(const char *name) { - if (strcmp("null", name) == 0) + if (strcasecmp("null", name) == 0) return (CRYPTO_NULL_CBC); - if (strcmp("aes", name) == 0) + else if (strcasecmp("aes", name) == 0) return (CRYPTO_AES_CBC); - else if (strcmp("blowfish", name) == 0) + else if (strcasecmp("blowfish", name) == 0) return (CRYPTO_BLF_CBC); - else if (strcmp("3des", name) == 0) + else if (strcasecmp("3des", name) == 0) return (CRYPTO_3DES_CBC); return (CRYPTO_ALGORITHM_MIN - 1); } |