reduce surprise in choice of CASE/String/STRING by allowing all inputs to be in any...
authorMichael Richardson <mcr@sandelman.ca>
Wed, 14 Apr 2021 15:44:41 +0000 (11:44 -0400)
committerPauli <pauli@openssl.org>
Tue, 11 May 2021 09:09:45 +0000 (19:09 +1000)
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)

crypto/asn1/asn1_gen.c
doc/man3/ASN1_generate_nconf.pod

index 3c003ee1038fe825dab8542e5195eedf0fab1671..8c3a2bd970fdee97d60162d99791b84db0ee5385 100644 (file)
@@ -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;
     }
 
index bf22e3624c8a14746bc870a75be830c4e89118c5..256ed9f99c3fff8d6abb4a6f6c431b4eb96425b0 100644 (file)
@@ -42,8 +42,9 @@ I<value> and I<modifier> are explained below.
 
 =head2 Supported Types
 
-The supported types are listed below. Unless otherwise specified
-only the B<ASCII> format is permissible.
+The supported types are listed below.
+Case is not significant in the type names.
+Unless otherwise specified only the B<ASCII> format is permissible.
 
 =over 4