Skip to content

Commit 85c07b6

Browse files
committed
Guard CertManagerVerify test calls behind client/OPENSSL_EXTRA compile conditions
1 parent 8ad7800 commit 85c07b6

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

tests/api/test_asn.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -822,8 +822,11 @@ int test_SerialNumber0_RootCA(void)
822822
WOLFSSL_SUCCESS);
823823

824824
/* Test 3: End-entity cert with serial 0 should be rejected during verify */
825+
#if (!defined(NO_WOLFSSL_CLIENT) || !defined(WOLFSSL_NO_CLIENT_AUTH)) || \
826+
defined(OPENSSL_EXTRA)
825827
ExpectIntEQ(wolfSSL_CertManagerVerify(cm, eeSerial0File,
826828
WOLFSSL_FILETYPE_PEM), WC_NO_ERR_TRACE(ASN_PARSE_E));
829+
#endif
827830

828831
if (cm != NULL) {
829832
wolfSSL_CertManagerFree(cm);
@@ -832,6 +835,8 @@ int test_SerialNumber0_RootCA(void)
832835

833836
/* Test 4: Normal end-entity cert signed by root CA with serial 0
834837
* should verify successfully */
838+
#if (!defined(NO_WOLFSSL_CLIENT) || !defined(WOLFSSL_NO_CLIENT_AUTH)) || \
839+
defined(OPENSSL_EXTRA)
835840
ExpectNotNull(cm = wolfSSL_CertManagerNew());
836841
ExpectIntEQ(wolfSSL_CertManagerLoadCA(cm, rootSerial0File, NULL),
837842
WOLFSSL_SUCCESS);
@@ -842,6 +847,7 @@ int test_SerialNumber0_RootCA(void)
842847
wolfSSL_CertManagerFree(cm);
843848
cm = NULL;
844849
}
850+
#endif
845851

846852
/* Test 5: Self-signed non-CA certificate with serial 0 should be rejected */
847853
ExpectNotNull(cm = wolfSSL_CertManagerNew());

0 commit comments

Comments
 (0)