@@ -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)
@@ -41785,8 +41787,10 @@ static int test_wolfSSL_BIO_gets(void)
4178541787 ExpectNotNull(emp_bm = BUF_MEM_new());
4178641788 ExpectNotNull(msg_bm = BUF_MEM_new());
4178741789 ExpectIntEQ(BUF_MEM_grow(msg_bm, sizeof(msg)), sizeof(msg));
41788- if (EXPECT_SUCCESS())
41790+ if (EXPECT_SUCCESS()) {
4178941791 XFREE(msg_bm->data, NULL, DYNAMIC_TYPE_OPENSSL);
41792+ msg_bm->data = NULL;
41793+ }
4179041794 /* emp size is 1 for terminator */
4179141795 ExpectIntEQ(BUF_MEM_grow(emp_bm, sizeof(emp)), sizeof(emp));
4179241796 if (EXPECT_SUCCESS()) {
@@ -43619,6 +43623,7 @@ static int test_wolfSSL_GENERAL_NAME_print(void)
4361943623 ExpectIntEQ(XSTRNCMP((const char*)outbuf, dnsStr, XSTRLEN(dnsStr)), 0);
4362043624
4362143625 sk_GENERAL_NAME_pop_free(sk, GENERAL_NAME_free);
43626+ gn = NULL;
4362243627 sk = NULL;
4362343628 X509_free(x509);
4362443629 x509 = NULL;
@@ -59053,12 +59058,12 @@ static int test_openssl_generate_key_and_cert(void)
5905359058{
5905459059 EXPECT_DECLS;
5905559060#if defined(OPENSSL_EXTRA)
59061+ int expectedDerSz;
5905659062 EVP_PKEY* pkey = NULL;
5905759063#ifdef HAVE_ECC
5905859064 EC_KEY* ec_key = NULL;
5905959065#endif
5906059066#if !defined(NO_RSA)
59061- int expectedDerSz;
5906259067 int key_length = 2048;
5906359068 BIGNUM* exponent = NULL;
5906459069 RSA* rsa = NULL;
@@ -59103,7 +59108,6 @@ static int test_openssl_generate_key_and_cert(void)
5910359108 #endif
5910459109 }
5910559110
59106- (void)expectedDerSz;
5910759111 EVP_PKEY_free(pkey);
5910859112 pkey = NULL;
5910959113 BN_free(exponent);
@@ -59133,6 +59137,7 @@ static int test_openssl_generate_key_and_cert(void)
5913359137 EVP_PKEY_free(pkey);
5913459138#endif /* HAVE_ECC */
5913559139 (void)pkey;
59140+ (void)expectedDerSz;
5913659141#endif /* OPENSSL_EXTRA */
5913759142
5913859143 return EXPECT_RESULT();
@@ -59266,10 +59271,10 @@ static int test_wolfSSL_CTX_LoadCRL(void)
5926659271 #define SUCC_T(x, y, z, p, d) ExpectIntEQ((int) x(y, z, p, d), \
5926759272 WOLFSSL_SUCCESS)
5926859273#ifndef NO_WOLFSSL_CLIENT
59269- #define NEW_CTX(ctx) AssertNotNull ( \
59274+ #define NEW_CTX(ctx) ExpectNotNull ( \
5927059275 (ctx) = wolfSSL_CTX_new(wolfSSLv23_client_method()))
5927159276#elif !defined(NO_WOLFSSL_SERVER)
59272- #define NEW_CTX(ctx) AssertNotNull ( \
59277+ #define NEW_CTX(ctx) ExpectNotNull ( \
5927359278 (ctx) = wolfSSL_CTX_new(wolfSSLv23_server_method()))
5927459279#else
5927559280 #define NEW_CTX(ctx) return
0 commit comments