forked from wolfSSL/wolfssl
add parsing 0 serial numbers for certs with python
This commit is contained in:
@@ -53815,7 +53815,7 @@ static int test_MakeCertWith0Ser(void)
|
|||||||
|
|
||||||
wc_InitDecodedCert(&decodedCert, der, (word32)derSize, NULL);
|
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),
|
ExpectIntEQ(wc_ParseCert(&decodedCert, CERT_TYPE, NO_VERIFY, NULL),
|
||||||
ASN_PARSE_E);
|
ASN_PARSE_E);
|
||||||
#else
|
#else
|
||||||
|
@@ -21876,7 +21876,7 @@ static int DecodeCertInternal(DecodedCert* cert, int verify, int* criticalExt,
|
|||||||
cert->version = version;
|
cert->version = version;
|
||||||
cert->serialSz = (int)serialSz;
|
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
|
/* 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.
|
* 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
|
* Since it is a non-conforming CA that issues a serial of 0 then we
|
||||||
|
Reference in New Issue
Block a user