Skip to content

Commit 83303d3

Browse files
committed
Fix serial0 tests to check for expected ASN_PARSE_E error code
1 parent c643038 commit 83303d3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/api/test_asn.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -675,8 +675,8 @@ int test_SerialNumber0_RootCA(void)
675675
WOLFSSL_SUCCESS);
676676

677677
/* Test 3: End-entity cert with serial 0 should be rejected during verify */
678-
ExpectIntNE(wolfSSL_CertManagerVerify(cm, eeSerial0File,
679-
WOLFSSL_FILETYPE_PEM), WOLFSSL_SUCCESS);
678+
ExpectIntEQ(wolfSSL_CertManagerVerify(cm, eeSerial0File,
679+
WOLFSSL_FILETYPE_PEM), WC_NO_ERR_TRACE(ASN_PARSE_E));
680680

681681
if (cm != NULL) {
682682
wolfSSL_CertManagerFree(cm);
@@ -698,8 +698,8 @@ int test_SerialNumber0_RootCA(void)
698698

699699
/* Test 5: Self-signed non-CA certificate with serial 0 should be rejected */
700700
ExpectNotNull(cm = wolfSSL_CertManagerNew());
701-
ExpectIntNE(wolfSSL_CertManagerLoadCA(cm, selfSignedNonCASerial0File, NULL),
702-
WOLFSSL_SUCCESS);
701+
ExpectIntEQ(wolfSSL_CertManagerLoadCA(cm, selfSignedNonCASerial0File, NULL),
702+
WC_NO_ERR_TRACE(ASN_PARSE_E));
703703

704704
if (cm != NULL) {
705705
wolfSSL_CertManagerFree(cm);

0 commit comments

Comments
 (0)