From 18bee3142de99dcfaa545430c5534ff8b0cb5b95 Mon Sep 17 00:00:00 2001 From: David Garske Date: Wed, 15 Feb 2023 14:57:43 -0800 Subject: [PATCH] Fix to use the right cert/key in the API unit test if overridden. --- tests/api.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/api.c b/tests/api.c index 3634760dc..8a67c22a5 100644 --- a/tests/api.c +++ b/tests/api.c @@ -5290,10 +5290,10 @@ static THREAD_RETURN WOLFSSL_THREAD test_server_nofail(void* args) } #endif #if defined(OPENSSL_EXTRA) || defined(WOLFSSL_EITHER_SIDE) - if (sharedCtx && wolfSSL_use_certificate_file(ssl, svrCertFile, + if (sharedCtx && wolfSSL_use_certificate_file(ssl, certFile, WOLFSSL_FILETYPE_PEM) != WOLFSSL_SUCCESS) { #else - if (wolfSSL_use_certificate_file(ssl, svrCertFile, + if (wolfSSL_use_certificate_file(ssl, certFile, WOLFSSL_FILETYPE_PEM) != WOLFSSL_SUCCESS) { #endif /*err_sys("can't load server cert chain file, " @@ -5301,10 +5301,10 @@ static THREAD_RETURN WOLFSSL_THREAD test_server_nofail(void* args) goto done; } #if defined(OPENSSL_EXTRA) || defined(WOLFSSL_EITHER_SIDE) - if (sharedCtx && wolfSSL_use_PrivateKey_file(ssl, svrKeyFile, + if (sharedCtx && wolfSSL_use_PrivateKey_file(ssl, keyFile, WOLFSSL_FILETYPE_PEM) != WOLFSSL_SUCCESS) { #else - if (wolfSSL_use_PrivateKey_file(ssl, svrKeyFile, + if (wolfSSL_use_PrivateKey_file(ssl, keyFile, WOLFSSL_FILETYPE_PEM) != WOLFSSL_SUCCESS) { #endif /*err_sys("can't load server key file, "