summaryrefslogtreecommitdiffstats
path: root/crypto/objects
diff options
context:
space:
mode:
authorDmitry Belyavskiy <beldmit@gmail.com>2022-04-12 12:30:08 +0200
committerDmitry Belyavskiy <beldmit@gmail.com>2022-04-22 11:34:41 +0200
commitfba140c73541c03e22b4fdb219a05d129bf0406d (patch)
treeb5c692f73ff063c2f071ef2383979fb8aa572164 /crypto/objects
parent4b2bd2722b8294a6b27c9e1fcf7d76f7d9de9b44 (diff)
str[n]casecmp => OPENSSL_strncasecmp
Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18069)
Diffstat (limited to 'crypto/objects')
-rw-r--r--crypto/objects/o_names.c21
1 files changed, 2 insertions, 19 deletions
diff --git a/crypto/objects/o_names.c b/crypto/objects/o_names.c
index 82fbc3bf96..e60a5a54ad 100644
--- a/crypto/objects/o_names.c
+++ b/crypto/objects/o_names.c
@@ -22,23 +22,6 @@
#include "internal/e_os.h"
/*
- * We define this wrapper for two reasons. Firstly, later versions of
- * DEC C add linkage information to certain functions, which makes it
- * tricky to use them as values to regular function pointers.
- * Secondly, in the EDK2 build environment, the strcasecmp function is
- * actually an external function with the Microsoft ABI, so we can't
- * transparently assign function pointers to it.
- */
-#if defined(OPENSSL_SYS_VMS_DECC) || defined(OPENSSL_SYS_UEFI)
-static int obj_strcasecmp(const char *a, const char *b)
-{
- return strcasecmp(a, b);
-}
-#else
-#define obj_strcasecmp strcasecmp
-#endif
-
-/*
* I use the ex_data stuff to manage the identifiers for the obj_name_types
* that applications may define. I only really use the free function field.
*/
@@ -111,7 +94,7 @@ int OBJ_NAME_new_index(unsigned long (*hash_func) (const char *),
goto out;
}
name_funcs->hash_func = ossl_lh_strcasehash;
- name_funcs->cmp_func = obj_strcasecmp;
+ name_funcs->cmp_func = OPENSSL_strcasecmp;
push = sk_NAME_FUNCS_push(name_funcs_stack, name_funcs);
if (!push) {
@@ -145,7 +128,7 @@ static int obj_name_cmp(const OBJ_NAME *a, const OBJ_NAME *b)
ret = sk_NAME_FUNCS_value(name_funcs_stack,
a->type)->cmp_func(a->name, b->name);
} else
- ret = strcasecmp(a->name, b->name);
+ ret = OPENSSL_strcasecmp(a->name, b->name);
}
return ret;
}