1
0
mirror of https://github.com/wolfSSL/wolfssl.git synced 2026-10-24 04:09:07 +03:00

Restrict duplicate netscape certificate type extensions f-10626

This commit is contained in:
JacobBarthelmeh
2026-08-21 13:19:09 -06:00
parent 4d1bd552d0
commit 986066c856
2 changed files with 5 additions and 1 deletions

View File

@@ -22744,6 +22744,7 @@ WOLFSSL_TEST_VIS int DecodeExtensionType(const byte* input, word32 length,
#ifndef IGNORE_NETSCAPE_CERT_TYPE
/* Netscape's certificate type. */
case NETSCAPE_CT_OID:
VERIFY_AND_SET_OID(cert->extNetscapeCertTypeSet);
if (DecodeNsCertType(input, (int)length, cert) < 0)
ret = ASN_PARSE_E;
break;

View File

@@ -2182,7 +2182,10 @@ struct DecodedCert {
WC_BITFIELD extPolicyConstIpmSet:1; /* inhibitPolicyMapping set */
WC_BITFIELD extSubjAltNameSet:1;
WC_BITFIELD inhibitAnyOidSet:1;
WC_BITFIELD selfSigned:1; /* Indicates subject and issuer are same */
#ifndef IGNORE_NETSCAPE_CERT_TYPE
WC_BITFIELD extNetscapeCertTypeSet:1; /* Netscape certificate type seen */
#endif
WC_BITFIELD selfSigned:1; /* Indicates subject and issuer are same */
#if defined(WOLFSSL_SEP) || defined(WOLFSSL_CERT_EXT)
WC_BITFIELD extCertPolicySet:1;
#endif