File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21391,7 +21391,7 @@ static int test_MakeCertWith0Ser(void)
2139121391 EXPECT_DECLS;
2139221392#if defined(WOLFSSL_CERT_REQ) && !defined(NO_ASN_TIME) && \
2139321393 defined(WOLFSSL_CERT_GEN) && !defined(NO_RSA) && \
21394- defined(WOLFSSL_ASN_TEMPLATE)
21394+ defined(WOLFSSL_KEY_GEN) && defined( WOLFSSL_ASN_TEMPLATE)
2139521395 Cert cert;
2139621396 DecodedCert decodedCert;
2139721397 byte der[FOURK_BUF];
Original file line number Diff line number Diff line change @@ -1073,6 +1073,9 @@ int test_SerialNumber0_RootCA(void)
10731073 wolfSSL_CertManagerFree (cm );
10741074 cm = NULL ;
10751075 }
1076+ /* Balance the wolfSSL_Init refcount incremented by internal
1077+ * wolfSSL_CTX_new_ex calls in CertManagerLoadCA/Verify. */
1078+ wolfSSL_Cleanup ();
10761079
10771080 /* Test 4: Self-signed non-CA certificate with serial 0 should be rejected */
10781081 ExpectNotNull (cm = wolfSSL_CertManagerNew ());
@@ -1083,6 +1086,7 @@ int test_SerialNumber0_RootCA(void)
10831086 wolfSSL_CertManagerFree (cm );
10841087 cm = NULL ;
10851088 }
1089+ wolfSSL_Cleanup ();
10861090#endif /* !WOLFSSL_NO_ASN_STRICT && !WOLFSSL_PYTHON &&
10871091 !WOLFSSL_ASN_ALLOW_0_SERIAL &&
10881092 !WOLFSSL_TEST_APPLE_NATIVE_CERT_VALIDATION */
You can’t perform that action at this time.
0 commit comments