add parsing 0 serial numbers for certs with python

This commit is contained in:
JacobBarthelmeh
2024-06-06 16:24:48 -06:00
parent 68f52cb49a
commit 467b3cb561
2 changed files with 2 additions and 2 deletions

View File

@@ -53815,7 +53815,7 @@ static int test_MakeCertWith0Ser(void)
wc_InitDecodedCert(&decodedCert, der, (word32)derSize, NULL);
#ifndef WOLFSSL_NO_ASN_STRICT
#if !defined(WOLFSSL_NO_ASN_STRICT) && !defined(WOLFSSL_PYTHON)
ExpectIntEQ(wc_ParseCert(&decodedCert, CERT_TYPE, NO_VERIFY, NULL),
ASN_PARSE_E);
#else

View File

@@ -21876,7 +21876,7 @@ static int DecodeCertInternal(DecodedCert* cert, int verify, int* criticalExt,
cert->version = version;
cert->serialSz = (int)serialSz;
#ifndef WOLFSSL_NO_ASN_STRICT
#if !defined(WOLFSSL_NO_ASN_STRICT) && !defined(WOLFSSL_PYTHON)
/* RFC 5280 section 4.1.2.2 states that non-conforming CAs may issue
* a negative or zero serial number and should be handled gracefully.
* Since it is a non-conforming CA that issues a serial of 0 then we