Skip to content

Commit 6bf716b

Browse files
authored
Merge pull request #6743 from JacobBarthelmeh/unit_tests
add test case for ignoring cert path error
2 parents f23e2a6 + e748e1b commit 6bf716b

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

tests/api.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1434,6 +1434,11 @@ static int test_wolfSSL_CTX_load_verify_locations(void)
14341434
ExpectIntEQ(wolfSSL_CTX_load_verify_locations(ctx, NULL, bogusFile),
14351435
WS_RETURN_CODE(BAD_PATH_ERROR,WOLFSSL_FAILURE));
14361436
#endif
1437+
#if defined(WOLFSSL_QT) || defined(WOLFSSL_IGNORE_BAD_CERT_PATH)
1438+
/* test ignoring the invalid path */
1439+
ExpectIntEQ(wolfSSL_CTX_load_verify_locations_ex(ctx, NULL, bogusFile,
1440+
WOLFSSL_LOAD_FLAG_IGNORE_BAD_PATH_ERR), WOLFSSL_SUCCESS);
1441+
#endif
14371442

14381443
/* load ca cert */
14391444
#ifdef NO_RSA

0 commit comments

Comments
 (0)