Skip to content

Commit 467b3cb

Browse files
add parsing 0 serial numbers for certs with python
1 parent 68f52cb commit 467b3cb

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

tests/api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53815,7 +53815,7 @@ static int test_MakeCertWith0Ser(void)
5381553815

5381653816
wc_InitDecodedCert(&decodedCert, der, (word32)derSize, NULL);
5381753817

53818-
#ifndef WOLFSSL_NO_ASN_STRICT
53818+
#if !defined(WOLFSSL_NO_ASN_STRICT) && !defined(WOLFSSL_PYTHON)
5381953819
ExpectIntEQ(wc_ParseCert(&decodedCert, CERT_TYPE, NO_VERIFY, NULL),
5382053820
ASN_PARSE_E);
5382153821
#else

wolfcrypt/src/asn.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21876,7 +21876,7 @@ static int DecodeCertInternal(DecodedCert* cert, int verify, int* criticalExt,
2187621876
cert->version = version;
2187721877
cert->serialSz = (int)serialSz;
2187821878

21879-
#ifndef WOLFSSL_NO_ASN_STRICT
21879+
#if !defined(WOLFSSL_NO_ASN_STRICT) && !defined(WOLFSSL_PYTHON)
2188021880
/* RFC 5280 section 4.1.2.2 states that non-conforming CAs may issue
2188121881
* a negative or zero serial number and should be handled gracefully.
2188221882
* Since it is a non-conforming CA that issues a serial of 0 then we

0 commit comments

Comments
 (0)