diff options
author | Richard Levitte <levitte@openssl.org> | 2019-06-05 08:59:13 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2019-06-24 10:58:13 +0200 |
commit | a9550b74d3efdf1727005dada706cc2e12c273b8 (patch) | |
tree | 406c70436a62ae7254bed5190d0f684aac215fb2 /crypto/core_namemap.c | |
parent | Add a namemap test (diff) | |
download | openssl-a9550b74d3efdf1727005dada706cc2e12c273b8.tar.xz openssl-a9550b74d3efdf1727005dada706cc2e12c273b8.zip |
OSSL_NAMEMAP: make names case insensitive
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/8967)
Diffstat (limited to 'crypto/core_namemap.c')
-rw-r--r-- | crypto/core_namemap.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/core_namemap.c b/crypto/core_namemap.c index 31dc933af1..d4c9419044 100644 --- a/crypto/core_namemap.c +++ b/crypto/core_namemap.c @@ -7,8 +7,10 @@ * https://www.openssl.org/source/license.html */ +#include "e_os.h" /* strcasecmp */ #include "internal/namemap.h" #include <openssl/lhash.h> +#include "internal/lhash.h" /* openssl_lh_strcasehash */ /*- * The namenum entry @@ -39,12 +41,12 @@ struct ossl_namemap_st { static unsigned long namenum_hash(const NAMENUM_ENTRY *n) { - return OPENSSL_LH_strhash(n->name); + return openssl_lh_strcasehash(n->name); } static int namenum_cmp(const NAMENUM_ENTRY *a, const NAMENUM_ENTRY *b) { - return strcmp(a->name, b->name); + return strcasecmp(a->name, b->name); } static void namenum_free(NAMENUM_ENTRY *n) |