@@ -1859,7 +1859,9 @@ static int test_wolfSSL_CertManagerAPI(void)
18591859#if !defined(NO_FILESYSTEM)
18601860 {
18611861 const char* ca_cert = "./certs/ca-cert.pem";
1862+ #if !defined(NO_WOLFSSL_CLIENT) || !defined(WOLFSSL_NO_CLIENT_AUTH)
18621863 const char* ca_cert_der = "./certs/ca-cert.der";
1864+ #endif
18631865 const char* ca_path = "./certs";
18641866
18651867 #if !defined(NO_WOLFSSL_CLIENT) || !defined(WOLFSSL_NO_CLIENT_AUTH)
@@ -41784,8 +41786,10 @@ static int test_wolfSSL_BIO_gets(void)
4178441786 ExpectNotNull(emp_bm = BUF_MEM_new());
4178541787 ExpectNotNull(msg_bm = BUF_MEM_new());
4178641788 ExpectIntEQ(BUF_MEM_grow(msg_bm, sizeof(msg)), sizeof(msg));
41787- if (EXPECT_SUCCESS())
41789+ if (EXPECT_SUCCESS()) {
4178841790 XFREE(msg_bm->data, NULL, DYNAMIC_TYPE_OPENSSL);
41791+ msg_bm->data = NULL;
41792+ }
4178941793 /* emp size is 1 for terminator */
4179041794 ExpectIntEQ(BUF_MEM_grow(emp_bm, sizeof(emp)), sizeof(emp));
4179141795 if (EXPECT_SUCCESS()) {
@@ -43618,6 +43622,7 @@ static int test_wolfSSL_GENERAL_NAME_print(void)
4361843622 ExpectIntEQ(XSTRNCMP((const char*)outbuf, dnsStr, XSTRLEN(dnsStr)), 0);
4361943623
4362043624 sk_GENERAL_NAME_pop_free(sk, GENERAL_NAME_free);
43625+ gn = NULL;
4362143626 sk = NULL;
4362243627 X509_free(x509);
4362343628 x509 = NULL;
@@ -59052,12 +59057,12 @@ static int test_openssl_generate_key_and_cert(void)
5905259057{
5905359058 EXPECT_DECLS;
5905459059#if defined(OPENSSL_EXTRA)
59060+ int expectedDerSz;
5905559061 EVP_PKEY* pkey = NULL;
5905659062#ifdef HAVE_ECC
5905759063 EC_KEY* ec_key = NULL;
5905859064#endif
5905959065#if !defined(NO_RSA)
59060- int expectedDerSz;
5906159066 int key_length = 2048;
5906259067 BIGNUM* exponent = NULL;
5906359068 RSA* rsa = NULL;
@@ -59102,7 +59107,6 @@ static int test_openssl_generate_key_and_cert(void)
5910259107 #endif
5910359108 }
5910459109
59105- (void)expectedDerSz;
5910659110 EVP_PKEY_free(pkey);
5910759111 pkey = NULL;
5910859112 BN_free(exponent);
@@ -59132,6 +59136,7 @@ static int test_openssl_generate_key_and_cert(void)
5913259136 EVP_PKEY_free(pkey);
5913359137#endif /* HAVE_ECC */
5913459138 (void)pkey;
59139+ (void)expectedDerSz;
5913559140#endif /* OPENSSL_EXTRA */
5913659141
5913759142 return EXPECT_RESULT();
@@ -59265,10 +59270,10 @@ static int test_wolfSSL_CTX_LoadCRL(void)
5926559270 #define SUCC_T(x, y, z, p, d) ExpectIntEQ((int) x(y, z, p, d), \
5926659271 WOLFSSL_SUCCESS)
5926759272#ifndef NO_WOLFSSL_CLIENT
59268- #define NEW_CTX(ctx) AssertNotNull ( \
59273+ #define NEW_CTX(ctx) ExpectNotNull ( \
5926959274 (ctx) = wolfSSL_CTX_new(wolfSSLv23_client_method()))
5927059275#elif !defined(NO_WOLFSSL_SERVER)
59271- #define NEW_CTX(ctx) AssertNotNull ( \
59276+ #define NEW_CTX(ctx) ExpectNotNull ( \
5927259277 (ctx) = wolfSSL_CTX_new(wolfSSLv23_server_method()))
5927359278#else
5927459279 #define NEW_CTX(ctx) return
0 commit comments