From e748e1be32186af1bdf6dd0dfb7a316305d1f073 Mon Sep 17 00:00:00 2001 From: JacobBarthelmeh Date: Wed, 30 Aug 2023 12:45:29 -0700 Subject: [PATCH] add test case for ignoring cert path error --- tests/api.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/api.c b/tests/api.c index a46feb756..97816a4cf 100644 --- a/tests/api.c +++ b/tests/api.c @@ -1434,6 +1434,11 @@ static int test_wolfSSL_CTX_load_verify_locations(void) ExpectIntEQ(wolfSSL_CTX_load_verify_locations(ctx, NULL, bogusFile), WS_RETURN_CODE(BAD_PATH_ERROR,WOLFSSL_FAILURE)); #endif +#if defined(WOLFSSL_QT) || defined(WOLFSSL_IGNORE_BAD_CERT_PATH) + /* test ignoring the invalid path */ + ExpectIntEQ(wolfSSL_CTX_load_verify_locations_ex(ctx, NULL, bogusFile, + WOLFSSL_LOAD_FLAG_IGNORE_BAD_PATH_ERR), WOLFSSL_SUCCESS); +#endif /* load ca cert */ #ifdef NO_RSA