@@ -4139,7 +4139,7 @@ static int test_wolfSSL_session_cache_api_direct(void)
41394139 ExpectIntEQ(wolfSSL_SetServerID(ssl, NULL, sizeof(shortId), 0),
41404140 BAD_FUNC_ARG);
41414141 ExpectIntEQ(wolfSSL_SetServerID(ssl, shortId, 0, 0), BAD_FUNC_ARG);
4142- #ifndef NO_CLIENT_CACHE
4142+ #if !defined( NO_CLIENT_CACHE) && !defined(NO_WOLFSSL_CLIENT)
41434143 ExpectIntEQ(wolfSSL_SetServerID(ssl, shortId, (int)sizeof(shortId), 1),
41444144 WOLFSSL_SUCCESS);
41454145 ExpectIntEQ(wolfSSL_SetServerID(ssl, longId, (int)sizeof(longId), 1),
@@ -4277,7 +4277,7 @@ static int test_wolfSSL_crl_ocsp_object_api(void)
42774277#endif
42784278#endif
42794279
4280- #ifdef HAVE_CERTIFICATE_STATUS_REQUEST
4280+ #if defined( HAVE_CERTIFICATE_STATUS_REQUEST) && !defined(NO_WOLFSSL_CLIENT)
42814281 ExpectIntEQ(wolfSSL_UseOCSPStapling(NULL, WOLFSSL_CSR_OCSP, 0),
42824282 WC_NO_ERR_TRACE(BAD_FUNC_ARG));
42834283#ifndef NO_WOLFSSL_SERVER
@@ -4288,15 +4288,13 @@ static int test_wolfSSL_crl_ocsp_object_api(void)
42884288 WC_NO_ERR_TRACE(BAD_FUNC_ARG));
42894289 }
42904290#endif
4291- #ifndef NO_WOLFSSL_CLIENT
42924291 ExpectIntEQ(wolfSSL_UseOCSPStapling(clientSsl, WOLFSSL_CSR_OCSP, 0),
42934292 WOLFSSL_SUCCESS);
42944293 ExpectIntEQ(wolfSSL_CTX_UseOCSPStapling(clientCtx, WOLFSSL_CSR_OCSP, 0),
42954294 WOLFSSL_SUCCESS);
42964295#endif
4297- #endif
42984296
4299- #ifdef HAVE_CERTIFICATE_STATUS_REQUEST_V2
4297+ #if defined( HAVE_CERTIFICATE_STATUS_REQUEST_V2) && !defined(NO_WOLFSSL_CLIENT)
43004298 ExpectIntEQ(wolfSSL_UseOCSPStaplingV2(NULL, WOLFSSL_CSR2_OCSP, 0),
43014299 WC_NO_ERR_TRACE(BAD_FUNC_ARG));
43024300#ifndef NO_WOLFSSL_SERVER
@@ -4307,12 +4305,10 @@ static int test_wolfSSL_crl_ocsp_object_api(void)
43074305 WC_NO_ERR_TRACE(BAD_FUNC_ARG));
43084306 }
43094307#endif
4310- #ifndef NO_WOLFSSL_CLIENT
43114308 ExpectIntEQ(wolfSSL_UseOCSPStaplingV2(clientSsl, WOLFSSL_CSR2_OCSP, 0),
43124309 WOLFSSL_SUCCESS);
43134310 ExpectIntEQ(wolfSSL_CTX_UseOCSPStaplingV2(clientCtx, WOLFSSL_CSR2_OCSP, 0),
43144311 WOLFSSL_SUCCESS);
4315- #endif
43164312#endif
43174313
43184314 wolfSSL_free(clientSsl);
@@ -27417,7 +27413,7 @@ static int test_CONF_CTX_CMDLINE(void)
2741727413{
2741827414 EXPECT_DECLS;
2741927415#if (defined(OPENSSL_EXTRA) || defined(OPENSSL_ALL)) && !defined(NO_TLS) && \
27420- !defined(NO_WOLFSSL_SERVER)
27416+ !defined(NO_WOLFSSL_SERVER) && !defined(NO_WOLFSSL_CLIENT)
2742127417 SSL_CTX* ctx = NULL;
2742227418 SSL_CONF_CTX* cctx = NULL;
2742327419 SSL_CONF_CTX* noCertCtx = NULL;
@@ -29044,7 +29040,7 @@ static int test_wc_CryptoCb_TLS(int tlsVer,
2904429040}
2904529041#endif /* WOLF_CRYPTO_CB && HAVE_IO_TESTS_DEPENDENCIES */
2904629042
29047- #if defined(WOLFSSL_HAVE_PRF) && !defined(NO_HMAC)
29043+ #if defined(WOLFSSL_HAVE_PRF) && !defined(NO_HMAC) && !defined(NO_SHA256)
2904829044static int test_wc_KdfPrf_guardrails(void)
2904929045{
2905029046 EXPECT_DECLS;
@@ -29064,6 +29060,8 @@ static int test_wc_KdfPrf_guardrails(void)
2906429060 ExpectIntEQ(wc_PRF(out, sizeof(out), secret, 16, seed, sizeof(seed),
2906529061 sha256_mac, HEAP_HINT, INVALID_DEVID), 0);
2906629062
29063+ /* PRF_TLSv1 requires both MD5 and SHA1. */
29064+ #if !defined(NO_MD5) && !defined(NO_SHA) && !defined(NO_OLD_TLS)
2906729065 ExpectIntEQ(wc_PRF_TLSv1(out, sizeof(out), secret, (word32)sizeof(secret),
2906829066 label, (word32)sizeof(label), seed, 1, HEAP_HINT, INVALID_DEVID),
2906929067 WC_NO_ERR_TRACE(BUFFER_E));
@@ -29072,13 +29070,16 @@ static int test_wc_KdfPrf_guardrails(void)
2907229070 WC_NO_ERR_TRACE(BUFFER_E));
2907329071 ExpectIntEQ(wc_PRF_TLSv1(out, sizeof(out), secret, 16,
2907429072 label, (word32)sizeof(label), seed, 1, HEAP_HINT, INVALID_DEVID), 0);
29073+ #endif
2907529074
2907629075 ExpectIntEQ(wc_PRF_TLS(out, sizeof(out), secret, 16, label,
2907729076 (word32)sizeof(label), seed, MAX_PRF_LABSEED, 1, sha256_mac,
2907829077 HEAP_HINT, INVALID_DEVID), WC_NO_ERR_TRACE(BUFFER_E));
29078+ #ifndef NO_MD5
2907929079 ExpectIntEQ(wc_PRF_TLS(out, sizeof(out), secret, 16, label,
2908029080 (word32)sizeof(label), seed, 1, 1, md5_mac, HEAP_HINT, INVALID_DEVID),
2908129081 0);
29082+ #endif
2908229083 return EXPECT_RESULT();
2908329084}
2908429085#endif
@@ -36611,17 +36612,19 @@ TEST_CASE testCases[] = {
3661136612 TEST_DECL(test_ticket_and_psk_mixing),
3661236613 /* Can't memory test as client/server Asserts in thread. */
3661336614 TEST_DECL(test_prioritize_psk),
36614- #if defined(WOLFSSL_HAVE_PRF) && !defined(NO_HMAC)
36615+ #if defined(WOLFSSL_HAVE_PRF) && !defined(NO_HMAC) && !defined(NO_SHA256)
3661536616 TEST_DECL(test_wc_KdfPrf_guardrails),
3661636617#endif
3661736618#if defined(HAVE_HKDF)
3661836619 TEST_DECL(test_wc_KdfHkdf_guardrails),
3661936620#endif
3662036621
36621- #ifdef WOLF_CRYPTO_CB
36622+ #if defined( WOLF_CRYPTO_CB) && defined(HAVE_IO_TESTS_DEPENDENCIES)
3662236623 TEST_DECL(test_wc_CryptoCb_hkdf_wrapper),
3662336624 /* Can't memory test as client/server hangs. */
3662436625 TEST_DECL(test_wc_CryptoCb_registry),
36626+ #endif
36627+ #ifdef WOLF_CRYPTO_CB
3662536628 /* Can't memory test as client/server hangs. */
3662636629 TEST_DECL(test_wc_CryptoCb),
3662736630#endif
0 commit comments