diff options
author | Dmitry Belyavskiy <beldmit@gmail.com> | 2022-04-12 12:30:08 +0200 |
---|---|---|
committer | Dmitry Belyavskiy <beldmit@gmail.com> | 2022-04-22 11:34:41 +0200 |
commit | fba140c73541c03e22b4fdb219a05d129bf0406d (patch) | |
tree | b5c692f73ff063c2f071ef2383979fb8aa572164 /crypto/asn1 | |
parent | 4b2bd2722b8294a6b27c9e1fcf7d76f7d9de9b44 (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/asn1')
-rw-r--r-- | crypto/asn1/ameth_lib.c | 3 | ||||
-rw-r--r-- | crypto/asn1/asn1_gen.c | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/crypto/asn1/ameth_lib.c b/crypto/asn1/ameth_lib.c index 9704492607..0de5785c27 100644 --- a/crypto/asn1/ameth_lib.c +++ b/crypto/asn1/ameth_lib.c @@ -10,7 +10,6 @@ /* We need to use some engine deprecated APIs */ #define OPENSSL_SUPPRESS_DEPRECATED -#include "internal/e_os.h" /* for strncasecmp */ #include "internal/cryptlib.h" #include <stdio.h> #include <openssl/asn1t.h> @@ -134,7 +133,7 @@ const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find_str(ENGINE **pe, if (ameth->pkey_flags & ASN1_PKEY_ALIAS) continue; if ((int)strlen(ameth->pem_str) == len - && strncasecmp(ameth->pem_str, str, len) == 0) + && OPENSSL_strncasecmp(ameth->pem_str, str, len) == 0) return ameth; } return NULL; diff --git a/crypto/asn1/asn1_gen.c b/crypto/asn1/asn1_gen.c index a112f7de9e..ef5b7010bb 100644 --- a/crypto/asn1/asn1_gen.c +++ b/crypto/asn1/asn1_gen.c @@ -10,7 +10,6 @@ #include "internal/cryptlib.h" #include <openssl/asn1.h> #include <openssl/x509v3.h> -#include "internal/e_os.h" /* strncasecmp() */ #define ASN1_GEN_FLAG 0x10000 #define ASN1_GEN_FLAG_IMP (ASN1_GEN_FLAG|1) @@ -565,7 +564,8 @@ static int asn1_str2tag(const char *tagstr, int len) tntmp = tnst; for (i = 0; i < OSSL_NELEM(tnst); i++, tntmp++) { - if ((len == tntmp->len) && (strncasecmp(tntmp->strnam, tagstr, len) == 0)) + if ((len == tntmp->len) + && (OPENSSL_strncasecmp(tntmp->strnam, tagstr, len) == 0)) return tntmp->tag; } |