summaryrefslogtreecommitdiffstats
path: root/crypto/asn1
diff options
context:
space:
mode:
authorMichael Richardson <mcr@sandelman.ca>2021-04-14 11:44:41 -0400
committerPauli <pauli@openssl.org>2021-05-11 19:09:45 +1000
commitf60e35d01e8b0116c53575774dbf26dcd2d2311d (patch)
tree89416167136cf2f0e47d7a1168fc8fc581b15148 /crypto/asn1
parenta7a7e6e3a647688be389b7d9c977b7fc74142fca (diff)
reduce surprise in choice of CASE/String/STRING by allowing all inputs to be in any case
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14877)
Diffstat (limited to 'crypto/asn1')
-rw-r--r--crypto/asn1/asn1_gen.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/asn1/asn1_gen.c b/crypto/asn1/asn1_gen.c
index 3c003ee103..8c3a2bd970 100644
--- a/crypto/asn1/asn1_gen.c
+++ b/crypto/asn1/asn1_gen.c
@@ -10,6 +10,7 @@
#include "internal/cryptlib.h"
#include <openssl/asn1.h>
#include <openssl/x509v3.h>
+#include "e_os.h" /* strncasecmp() */
#define ASN1_GEN_FLAG 0x10000
#define ASN1_GEN_FLAG_IMP (ASN1_GEN_FLAG|1)
@@ -564,7 +565,7 @@ static int asn1_str2tag(const char *tagstr, int len)
tntmp = tnst;
for (i = 0; i < OSSL_NELEM(tnst); i++, tntmp++) {
- if ((len == tntmp->len) && (strncmp(tntmp->strnam, tagstr, len) == 0))
+ if ((len == tntmp->len) && (strncasecmp(tntmp->strnam, tagstr, len) == 0))
return tntmp->tag;
}