Skip to content

Commit c291477

Browse files
committed
Fix more test config mismatch. Codespell fixes.
1 parent 19cf07a commit c291477

7 files changed

Lines changed: 39 additions & 18 deletions

File tree

tests/api.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4231,9 +4231,12 @@ static int test_wolfSSL_crl_ocsp_object_api(void)
42314231
WC_NO_ERR_TRACE(BAD_FUNC_ARG));
42324232
ExpectIntEQ(wolfSSL_CTX_SetOCSP_Cb(NULL, NULL, NULL, NULL),
42334233
WC_NO_ERR_TRACE(BAD_FUNC_ARG));
4234+
#if defined(HAVE_CERTIFICATE_STATUS_REQUEST) || \
4235+
defined(HAVE_CERTIFICATE_STATUS_REQUEST_V2)
42344236
ExpectIntEQ(wolfSSL_CTX_EnableOCSPStapling(NULL), WC_NO_ERR_TRACE(BAD_FUNC_ARG));
42354237
ExpectIntEQ(wolfSSL_CTX_DisableOCSPStapling(NULL),
42364238
WC_NO_ERR_TRACE(BAD_FUNC_ARG));
4239+
#endif
42374240
ExpectIntEQ(wolfSSL_EnableOCSP(NULL, 0), WC_NO_ERR_TRACE(BAD_FUNC_ARG));
42384241
ExpectIntEQ(wolfSSL_DisableOCSP(NULL), WC_NO_ERR_TRACE(BAD_FUNC_ARG));
42394242
ExpectIntEQ(wolfSSL_EnableOCSPStapling(NULL), WC_NO_ERR_TRACE(BAD_FUNC_ARG));
@@ -4246,8 +4249,11 @@ static int test_wolfSSL_crl_ocsp_object_api(void)
42464249
ExpectIntEQ(wolfSSL_CTX_EnableOCSP(clientCtx, WOLFSSL_OCSP_NO_NONCE),
42474250
WOLFSSL_SUCCESS);
42484251
ExpectIntEQ(wolfSSL_CTX_DisableOCSP(clientCtx), WOLFSSL_SUCCESS);
4252+
#if defined(HAVE_CERTIFICATE_STATUS_REQUEST) || \
4253+
defined(HAVE_CERTIFICATE_STATUS_REQUEST_V2)
42494254
ExpectIntEQ(wolfSSL_CTX_EnableOCSPStapling(clientCtx), WOLFSSL_SUCCESS);
42504255
ExpectIntEQ(wolfSSL_CTX_DisableOCSPStapling(clientCtx), WOLFSSL_SUCCESS);
4256+
#endif
42514257
ExpectIntEQ(wolfSSL_CTX_SetOCSP_OverrideURL(clientCtx, "http://dummy.test"),
42524258
WOLFSSL_SUCCESS);
42534259
ExpectIntEQ(wolfSSL_CTX_SetOCSP_OverrideURL(clientCtx, ""),

tests/api/test_chacha.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ int test_wc_ChachaBadArgCoverage(void)
105105
/* Pair B: key NULL -> BAD_FUNC_ARG (key is the unique T) */
106106
ExpectIntEQ(wc_Chacha_SetKey(&ctx, NULL, sizeof(key32)),
107107
WC_NO_ERR_TRACE(BAD_FUNC_ARG));
108-
/* Pair B complement: key valid, keySz 32 -> 0 (re-use prior success) */
108+
/* Pair B complement: key valid, keySz 32 -> 0 (reuse prior success) */
109109

110110
/* Pair C: keySz invalid (bad size) -> BAD_FUNC_ARG */
111111
ExpectIntEQ(wc_Chacha_SetKey(&ctx, key32, 18),

tests/api/test_ecc.c

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1880,7 +1880,8 @@ int test_wc_EccRequirementCoverage(void)
18801880
{
18811881
EXPECT_DECLS;
18821882
#if defined(HAVE_ECC) && !defined(NO_ECC256) && !defined(NO_ECC_SECP) && \
1883-
!defined(WC_NO_RNG) && !defined(HAVE_FIPS) && !defined(HAVE_SELFTEST)
1883+
!defined(WC_NO_RNG) && !defined(HAVE_FIPS) && !defined(HAVE_SELFTEST) && \
1884+
defined(OPENSSL_EXTRA) && defined(WOLFSSL_PUBLIC_MP)
18841885
WC_RNG rng;
18851886
int initRng = 0;
18861887

@@ -2072,7 +2073,8 @@ int test_wc_EccBadArgCoverage(void)
20722073
{
20732074
EXPECT_DECLS;
20742075
#if defined(HAVE_ECC) && !defined(NO_ECC256) && !defined(NO_ECC_SECP) && \
2075-
!defined(HAVE_FIPS) && !defined(HAVE_SELFTEST)
2076+
!defined(HAVE_FIPS) && !defined(HAVE_SELFTEST) && \
2077+
defined(OPENSSL_EXTRA) && defined(WOLFSSL_PUBLIC_MP)
20762078
const ecc_set_type* dp = NULL;
20772079
int idx = wc_ecc_get_curve_idx(ECC_SECP256R1);
20782080
ExpectIntGE(idx, 0);
@@ -2276,7 +2278,8 @@ int test_wc_EccBadArgCoverage2(void)
22762278
{
22772279
EXPECT_DECLS;
22782280
#if defined(HAVE_ECC) && !defined(NO_ECC256) && !defined(NO_ECC_SECP) && \
2279-
!defined(WC_NO_RNG) && !defined(HAVE_FIPS) && !defined(HAVE_SELFTEST)
2281+
!defined(WC_NO_RNG) && !defined(HAVE_FIPS) && !defined(HAVE_SELFTEST) && \
2282+
defined(WOLFSSL_PUBLIC_MP)
22802283
const ecc_set_type* dp = NULL;
22812284
int idx = wc_ecc_get_curve_idx(ECC_SECP256R1);
22822285
static const char bogusHex[] = "01";
@@ -2518,7 +2521,8 @@ int test_wc_EccBadArgCoverage3(void)
25182521
{
25192522
EXPECT_DECLS;
25202523
#if defined(HAVE_ECC) && !defined(NO_ECC256) && !defined(NO_ECC_SECP) && \
2521-
!defined(WC_NO_RNG) && !defined(HAVE_FIPS) && !defined(HAVE_SELFTEST)
2524+
!defined(WC_NO_RNG) && !defined(HAVE_FIPS) && !defined(HAVE_SELFTEST) && \
2525+
defined(OPENSSL_EXTRA) && defined(WOLFSSL_PUBLIC_MP)
25222526
WC_RNG rng;
25232527
int initRng = 0;
25242528
ecc_key key;
@@ -2761,7 +2765,8 @@ int test_wc_EccBadArgCoverage4(void)
27612765
{
27622766
EXPECT_DECLS;
27632767
#if defined(HAVE_ECC) && !defined(NO_ECC256) && !defined(NO_ECC_SECP) && \
2764-
!defined(WC_NO_RNG) && !defined(HAVE_FIPS) && !defined(HAVE_SELFTEST)
2768+
!defined(WC_NO_RNG) && !defined(HAVE_FIPS) && !defined(HAVE_SELFTEST) && \
2769+
defined(WOLFSSL_PUBLIC_MP)
27652770
WC_RNG rng;
27662771
int initRng = 0;
27672772
ecc_key key;
@@ -3222,7 +3227,8 @@ int test_wc_EccBadArgCoverage6(void)
32223227
{
32233228
EXPECT_DECLS;
32243229
#if defined(HAVE_ECC) && !defined(NO_ECC256) && !defined(NO_ECC_SECP) && \
3225-
!defined(WC_NO_RNG) && !defined(HAVE_FIPS) && !defined(HAVE_SELFTEST)
3230+
!defined(WC_NO_RNG) && !defined(HAVE_FIPS) && !defined(HAVE_SELFTEST) && \
3231+
defined(OPENSSL_EXTRA) && defined(WOLFSSL_PUBLIC_MP)
32263232
WC_RNG rng;
32273233
int initRng = 0;
32283234
ecc_key key;
@@ -3370,7 +3376,8 @@ int test_wc_EccBadArgCoverage7(void)
33703376
{
33713377
EXPECT_DECLS;
33723378
#if defined(HAVE_ECC) && !defined(NO_ECC256) && !defined(NO_ECC_SECP) && \
3373-
!defined(WC_NO_RNG) && !defined(HAVE_FIPS) && !defined(HAVE_SELFTEST)
3379+
!defined(WC_NO_RNG) && !defined(HAVE_FIPS) && !defined(HAVE_SELFTEST) && \
3380+
defined(WOLFSSL_PUBLIC_MP)
33743381

33753382
/* --- wc_ecc_get_curve_id L4296 --- */
33763383
{
@@ -3534,7 +3541,8 @@ int test_wc_EccBadArgCoverage8(void)
35343541
{
35353542
EXPECT_DECLS;
35363543
#if defined(HAVE_ECC) && !defined(NO_ECC256) && !defined(NO_ECC_SECP) && \
3537-
!defined(WC_NO_RNG) && !defined(HAVE_FIPS) && !defined(HAVE_SELFTEST)
3544+
!defined(WC_NO_RNG) && !defined(HAVE_FIPS) && !defined(HAVE_SELFTEST) && \
3545+
defined(WOLFSSL_PUBLIC_MP)
35383546
WC_RNG rng;
35393547
int initRng = 0;
35403548
ecc_key key;
@@ -3819,7 +3827,8 @@ int test_wc_EccBadArgCoverage9(void)
38193827
{
38203828
EXPECT_DECLS;
38213829
#if defined(HAVE_ECC) && !defined(NO_ECC256) && !defined(NO_ECC_SECP) && \
3822-
!defined(WC_NO_RNG) && !defined(HAVE_FIPS) && !defined(HAVE_SELFTEST)
3830+
!defined(WC_NO_RNG) && !defined(HAVE_FIPS) && !defined(HAVE_SELFTEST) && \
3831+
defined(WOLFSSL_PUBLIC_MP)
38233832
WC_RNG rng;
38243833
int initRng = 0;
38253834
ecc_key key;

tests/api/test_evp_cipher.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3120,7 +3120,7 @@ int test_wolfSSL_EvpCipherFinalBadArg(void)
31203120
*
31213121
* Also exercises:
31223122
* - enc=-1 (no-change) on AES-CBC → should succeed preserving prior enc value
3123-
* - type=NULL re-init after type is already set (re-use current cipherType)
3123+
* - type=NULL re-init after type is already set (reuse current cipherType)
31243124
* - AES-ECB non-GCM path
31253125
* ---------------------------------------------------------------------------
31263126
*/

tests/api/test_tls.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1484,6 +1484,11 @@ int test_tls_tlsx_parse_coverage(void)
14841484
WOLFSSL_CTX *ctx_c = NULL, *ctx_s = NULL;
14851485
WOLFSSL *ssl_c = NULL, *ssl_s = NULL;
14861486
struct test_memio_ctx test_ctx;
1487+
(void)ctx_c;
1488+
(void)ssl_c;
1489+
(void)ctx_s;
1490+
(void)ssl_s;
1491+
(void)test_ctx;
14871492

14881493
/* --- Subtest 1: TLS 1.2 full handshake with SNI + EMS + ETM + CSR.
14891494
* Exercises TLSX_Parse dispatch branches for:

tests/api/test_tls13.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4421,7 +4421,7 @@ int test_tls13_mcdc_batch2_sigalgs(void)
44214421
{
44224422
EXPECT_DECLS;
44234423
#if defined(HAVE_MANUAL_MEMIO_TESTS_DEPENDENCIES) && \
4424-
defined(WOLFSSL_TLS13) && \
4424+
defined(WOLFSSL_TLS13) && defined(OPENSSL_EXTRA) && \
44254425
!defined(NO_WOLFSSL_CLIENT) && !defined(NO_WOLFSSL_SERVER) && \
44264426
!defined(NO_CERTS) && !defined(NO_FILESYSTEM)
44274427
struct test_memio_ctx test_ctx;
@@ -4564,7 +4564,7 @@ int test_tls13_mcdc_batch2_mutual_sigalgs(void)
45644564
{
45654565
EXPECT_DECLS;
45664566
#if defined(HAVE_MANUAL_MEMIO_TESTS_DEPENDENCIES) && \
4567-
defined(WOLFSSL_TLS13) && \
4567+
defined(WOLFSSL_TLS13) && defined(OPENSSL_EXTRA) && \
45684568
!defined(NO_WOLFSSL_CLIENT) && !defined(NO_WOLFSSL_SERVER) && \
45694569
!defined(NO_CERTS) && !defined(NO_FILESYSTEM)
45704570
struct test_memio_ctx test_ctx;
@@ -4752,7 +4752,7 @@ int test_tls13_mcdc_batch2_alpn(void)
47524752
}
47534753

47544754
/* ---------------------------------------------------------------------------
4755-
* MC/DC batch 12: TLS 1.3 double-ticket resumption (PSK re-used twice).
4755+
* MC/DC batch 12: TLS 1.3 double-ticket resumption (PSK reused twice).
47564756
*
47574757
* Drives:
47584758
* SetupPskKey PSK-only vs PSK+DHE branch (L4338 —
@@ -4922,7 +4922,7 @@ int test_tls13_mcdc_batch2_statemachine(void)
49224922
wolfTLSv1_3_client_method,
49234923
wolfTLSv1_3_server_method), 0);
49244924

4925-
/* Re-use test_memio_do_handshake with a generous step budget to let it
4925+
/* Reuse test_memio_do_handshake with a generous step budget to let it
49264926
* interleave connect/accept calls in a fine-grained manner. */
49274927
ExpectIntEQ(test_memio_do_handshake(ssl_c, ssl_s, 40, NULL), 0);
49284928

tests/api/test_wolfmath.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,8 @@ int test_wc_export_int(void)
217217
int test_wc_WolfmathBadArgCoverage(void)
218218
{
219219
EXPECT_DECLS;
220-
#if !defined(NO_BIG_INT) || defined(WOLFSSL_SP_MATH)
220+
#if (!defined(NO_BIG_INT) || defined(WOLFSSL_SP_MATH)) && \
221+
defined(WOLFSSL_PUBLIC_MP)
221222
mp_int a;
222223
mp_int b;
223224

@@ -465,8 +466,8 @@ int test_wc_WolfmathCondCopyCoverage(void)
465466
int test_wc_WolfmathRandCoverage(void)
466467
{
467468
EXPECT_DECLS;
468-
#if !defined(WC_NO_RNG) && \
469-
(defined(WC_RSA_BLINDING) || defined(WOLFSSL_PUBLIC_MP))
469+
#if !defined(WC_NO_RNG) && defined(WOLFSSL_PUBLIC_MP) && \
470+
(defined(WC_RSA_BLINDING) || defined(WOLFSSL_KEY_GEN))
470471
WC_RNG rng;
471472
mp_int a;
472473

0 commit comments

Comments
 (0)