From: Michael Richardson Date: Wed, 14 Apr 2021 15:44:41 +0000 (-0400) Subject: reduce surprise in choice of CASE/String/STRING by allowing all inputs to be in any... X-Git-Tag: openssl-3.0.0-alpha17~198 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f60e35d01e8b0116c53575774dbf26dcd2d2311d;p=thirdparty%2Fopenssl.git reduce surprise in choice of CASE/String/STRING by allowing all inputs to be in any case Reviewed-by: Tomas Mraz Reviewed-by: Shane Lontis Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/14877) --- diff --git a/crypto/asn1/asn1_gen.c b/crypto/asn1/asn1_gen.c index 3c003ee1038..8c3a2bd970f 100644 --- a/crypto/asn1/asn1_gen.c +++ b/crypto/asn1/asn1_gen.c @@ -10,6 +10,7 @@ #include "internal/cryptlib.h" #include #include +#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; } diff --git a/doc/man3/ASN1_generate_nconf.pod b/doc/man3/ASN1_generate_nconf.pod index bf22e3624c8..256ed9f99c3 100644 --- a/doc/man3/ASN1_generate_nconf.pod +++ b/doc/man3/ASN1_generate_nconf.pod @@ -42,8 +42,9 @@ I and I are explained below. =head2 Supported Types -The supported types are listed below. Unless otherwise specified -only the B format is permissible. +The supported types are listed below. +Case is not significant in the type names. +Unless otherwise specified only the B format is permissible. =over 4