summaryrefslogtreecommitdiffstats
path: root/engines
diff options
context:
space:
mode:
authorDmitry Belyavskiy <beldmit@gmail.com>2022-04-12 12:30:08 +0200
committerDmitry Belyavskiy <beldmit@gmail.com>2022-04-21 17:12:32 +0200
commit2c31d942af28a20e87979cbc76c3dd8d162c1a9c (patch)
treea7927f89d19ef4c9604eb80fbefc4fa1ac2d4734 /engines
parenta8e4ddc6d15b6e6b308428753bc22b12422adacf (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/18103)
Diffstat (limited to 'engines')
-rw-r--r--engines/e_devcrypto.c8
-rw-r--r--engines/e_loader_attic.c9
-rw-r--r--engines/e_ossltest.c6
3 files changed, 9 insertions, 14 deletions
diff --git a/engines/e_devcrypto.c b/engines/e_devcrypto.c
index fa01317db5..a9c10d375a 100644
--- a/engines/e_devcrypto.c
+++ b/engines/e_devcrypto.c
@@ -1159,9 +1159,9 @@ static int devcrypto_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f) (void))
case DEVCRYPTO_CMD_CIPHERS:
if (p == NULL)
return 1;
- if (strcasecmp((const char *)p, "ALL") == 0) {
+ if (OPENSSL_strcasecmp((const char *)p, "ALL") == 0) {
devcrypto_select_all_ciphers(selected_ciphers);
- } else if (strcasecmp((const char*)p, "NONE") == 0) {
+ } else if (OPENSSL_strcasecmp((const char*)p, "NONE") == 0) {
memset(selected_ciphers, 0, sizeof(selected_ciphers));
} else {
new_list=OPENSSL_zalloc(sizeof(selected_ciphers));
@@ -1179,9 +1179,9 @@ static int devcrypto_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f) (void))
case DEVCRYPTO_CMD_DIGESTS:
if (p == NULL)
return 1;
- if (strcasecmp((const char *)p, "ALL") == 0) {
+ if (OPENSSL_strcasecmp((const char *)p, "ALL") == 0) {
devcrypto_select_all_digests(selected_digests);
- } else if (strcasecmp((const char*)p, "NONE") == 0) {
+ } else if (OPENSSL_strcasecmp((const char*)p, "NONE") == 0) {
memset(selected_digests, 0, sizeof(selected_digests));
} else {
new_list=OPENSSL_zalloc(sizeof(selected_digests));
diff --git a/engines/e_loader_attic.c b/engines/e_loader_attic.c
index 391ed33d5e..f6de29c0c3 100644
--- a/engines/e_loader_attic.c
+++ b/engines/e_loader_attic.c
@@ -14,7 +14,6 @@
/* We need to use some engine deprecated APIs */
#define OPENSSL_SUPPRESS_DEPRECATED
-/* #include "e_os.h" */
#include <string.h>
#include <sys/stat.h>
#include <ctype.h>
@@ -44,7 +43,6 @@ DEFINE_STACK_OF(OSSL_STORE_INFO)
#ifdef _WIN32
# define stat _stat
-# define strncasecmp _strnicmp
#endif
#ifndef S_ISDIR
@@ -971,12 +969,12 @@ static OSSL_STORE_LOADER_CTX *file_open_ex
* There's a special case if the URI also contains an authority, then
* the full URI shouldn't be used as a path anywhere.
*/
- if (strncasecmp(uri, "file:", 5) == 0) {
+ if (OPENSSL_strncasecmp(uri, "file:", 5) == 0) {
const char *p = &uri[5];
if (strncmp(&uri[5], "//", 2) == 0) {
path_data_n--; /* Invalidate using the full URI */
- if (strncasecmp(&uri[7], "localhost/", 10) == 0) {
+ if (OPENSSL_strncasecmp(&uri[7], "localhost/", 10) == 0) {
p = &uri[16];
} else if (uri[7] == '/') {
p = &uri[7];
@@ -1466,7 +1464,8 @@ static int file_name_check(OSSL_STORE_LOADER_CTX *ctx, const char *name)
/*
* First, check the basename
*/
- if (strncasecmp(name, ctx->_.dir.search_name, len) != 0 || name[len] != '.')
+ if (OPENSSL_strncasecmp(name, ctx->_.dir.search_name, len) != 0
+ || name[len] != '.')
return 0;
p = &name[len + 1];
diff --git a/engines/e_ossltest.c b/engines/e_ossltest.c
index 0506faa628..5d31b31c11 100644
--- a/engines/e_ossltest.c
+++ b/engines/e_ossltest.c
@@ -42,10 +42,6 @@
#include "e_ossltest_err.c"
-#ifdef _WIN32
-# define strncasecmp _strnicmp
-#endif
-
/* Engine Id and Name */
static const char *engine_ossltest_id = "ossltest";
static const char *engine_ossltest_name = "OpenSSL Test engine support";
@@ -383,7 +379,7 @@ static EVP_PKEY *load_key(ENGINE *eng, const char *key_id, int pub,
BIO *in;
EVP_PKEY *key;
- if (strncasecmp(key_id, "ot:", 3) != 0)
+ if (OPENSSL_strncasecmp(key_id, "ot:", 3) != 0)
return NULL;
key_id += 3;