forked from wolfSSL/wolfssl
restore PR#1819 to pass Jenkins tests.
This commit is contained in:
12
tests/api.c
12
tests/api.c
@ -743,9 +743,7 @@ static void test_wolfSSL_CTX_load_verify_locations(void)
|
|||||||
#if !defined(NO_WOLFSSL_DIR) && !defined(WOLFSSL_TIRTOS)
|
#if !defined(NO_WOLFSSL_DIR) && !defined(WOLFSSL_TIRTOS)
|
||||||
const char* load_certs_path = "./certs/external";
|
const char* load_certs_path = "./certs/external";
|
||||||
const char* load_no_certs_path = "./examples";
|
const char* load_no_certs_path = "./examples";
|
||||||
#ifndef NO_RSA
|
|
||||||
const char* load_expired_path = "./certs/test/expired";
|
const char* load_expired_path = "./certs/test/expired";
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
AssertNotNull(ctx = wolfSSL_CTX_new(wolfSSLv23_client_method()));
|
AssertNotNull(ctx = wolfSSL_CTX_new(wolfSSLv23_client_method()));
|
||||||
@ -803,8 +801,9 @@ static void test_wolfSSL_CTX_load_verify_locations(void)
|
|||||||
#if !defined(NO_WOLFSSL_DIR) && !defined(WOLFSSL_TIRTOS)
|
#if !defined(NO_WOLFSSL_DIR) && !defined(WOLFSSL_TIRTOS)
|
||||||
/* Test loading CA certificates using a path */
|
/* Test loading CA certificates using a path */
|
||||||
#ifdef NO_RSA
|
#ifdef NO_RSA
|
||||||
AssertIntEQ(wolfSSL_CTX_load_verify_locations_ex(ctx, NULL, load_certs_path,
|
/* failure here okay since certs in external directory are RSA */
|
||||||
WOLFSSL_LOAD_FLAG_PEM_CA_ONLY), ASN_UNKNOWN_OID_E);
|
AssertIntNE(wolfSSL_CTX_load_verify_locations_ex(ctx, NULL, load_certs_path,
|
||||||
|
WOLFSSL_LOAD_FLAG_PEM_CA_ONLY), WOLFSSL_SUCCESS);
|
||||||
#else
|
#else
|
||||||
AssertIntEQ(wolfSSL_CTX_load_verify_locations_ex(ctx, NULL, load_certs_path,
|
AssertIntEQ(wolfSSL_CTX_load_verify_locations_ex(ctx, NULL, load_certs_path,
|
||||||
WOLFSSL_LOAD_FLAG_PEM_CA_ONLY), WOLFSSL_SUCCESS);
|
WOLFSSL_LOAD_FLAG_PEM_CA_ONLY), WOLFSSL_SUCCESS);
|
||||||
@ -816,8 +815,9 @@ static void test_wolfSSL_CTX_load_verify_locations(void)
|
|||||||
|
|
||||||
/* Test loading expired CA certificates */
|
/* Test loading expired CA certificates */
|
||||||
#ifdef NO_RSA
|
#ifdef NO_RSA
|
||||||
AssertIntEQ(wolfSSL_CTX_load_verify_locations_ex(ctx, NULL, load_certs_path,
|
AssertIntNE(wolfSSL_CTX_load_verify_locations_ex(ctx, NULL, load_expired_path,
|
||||||
WOLFSSL_LOAD_FLAG_DATE_ERR_OKAY | WOLFSSL_LOAD_FLAG_PEM_CA_ONLY), ASN_UNKNOWN_OID_E);
|
WOLFSSL_LOAD_FLAG_DATE_ERR_OKAY | WOLFSSL_LOAD_FLAG_PEM_CA_ONLY),
|
||||||
|
WOLFSSL_SUCCESS);
|
||||||
#else
|
#else
|
||||||
AssertIntNE(wolfSSL_CTX_load_verify_locations_ex(ctx, NULL, load_expired_path,
|
AssertIntNE(wolfSSL_CTX_load_verify_locations_ex(ctx, NULL, load_expired_path,
|
||||||
WOLFSSL_LOAD_FLAG_DATE_ERR_OKAY | WOLFSSL_LOAD_FLAG_PEM_CA_ONLY),
|
WOLFSSL_LOAD_FLAG_DATE_ERR_OKAY | WOLFSSL_LOAD_FLAG_PEM_CA_ONLY),
|
||||||
|
Reference in New Issue
Block a user