From a29d12fd3fb2536db229a67d32e0eb816a76c573 Mon Sep 17 00:00:00 2001 From: Sebastian Carpenter Date: Thu, 29 May 2025 15:19:33 -0600 Subject: [PATCH] WOLFSSL_ASN_ALLOW_0_SERIAL not handled in make check test_MakeCertWith0Ser needed an extra #define check for WOLFSSL_ASN_ALLOW_0_SERIAL. Previously, it was validating that a 0 serial should not work -> now it validates that a 0 serial does work. --- tests/api.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/api.c b/tests/api.c index d4be8331f..63e3f0216 100644 --- a/tests/api.c +++ b/tests/api.c @@ -45925,7 +45925,8 @@ static int test_MakeCertWith0Ser(void) wc_InitDecodedCert(&decodedCert, der, (word32)derSize, NULL); -#if !defined(WOLFSSL_NO_ASN_STRICT) && !defined(WOLFSSL_PYTHON) +#if !defined(WOLFSSL_NO_ASN_STRICT) && !defined(WOLFSSL_PYTHON) && \ + !defined(WOLFSSL_ASN_ALLOW_0_SERIAL) ExpectIntEQ(wc_ParseCert(&decodedCert, CERT_TYPE, NO_VERIFY, NULL), WC_NO_ERR_TRACE(ASN_PARSE_E)); #else