File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -926,7 +926,8 @@ int test_SerialNumber0_RootCA(void)
926926 EXPECT_DECLS ;
927927
928928#if !defined(NO_CERTS ) && !defined(NO_FILESYSTEM ) && !defined(NO_RSA ) && \
929- !defined(WOLFSSL_NO_PEM ) && defined(WOLFSSL_PEM_TO_DER )
929+ !defined(WOLFSSL_NO_PEM ) && defined(WOLFSSL_PEM_TO_DER ) && \
930+ !defined(WOLFSSL_TEST_APPLE_NATIVE_CERT_VALIDATION )
930931 /* Test that root CA certificates with serial number 0 are accepted,
931932 * while non-root certificates with serial 0 are rejected (issue #8615) */
932933
@@ -983,10 +984,15 @@ int test_SerialNumber0_RootCA(void)
983984 }
984985#endif
985986
987+ if (cm != NULL ) {
988+ wolfSSL_CertManagerFree (cm );
989+ cm = NULL ;
990+ }
991+
986992 /* Test 5: Self-signed non-CA certificate with serial 0 should be rejected */
987993 ExpectNotNull (cm = wolfSSL_CertManagerNew ());
988- ExpectIntNE (wolfSSL_CertManagerLoadCA (cm , selfSignedNonCASerial0File , NULL ),
989- WOLFSSL_SUCCESS );
994+ ExpectIntEQ (wolfSSL_CertManagerLoadCA (cm , selfSignedNonCASerial0File , NULL ),
995+ WC_NO_ERR_TRACE ( ASN_PARSE_E ) );
990996
991997 if (cm != NULL ) {
992998 wolfSSL_CertManagerFree (cm );
You can’t perform that action at this time.
0 commit comments