From cac11e3d094a117e4acc992dde852ff9eb1f8952 Mon Sep 17 00:00:00 2001 From: Brett Nicholas <7547222+bigbrett@users.noreply.github.com> Date: Mon, 28 Oct 2024 12:22:10 -0600 Subject: [PATCH] add non-feature-specific macro to disable ECC sign/verify of all-zero digest --- wolfcrypt/test/test.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index 4c3c9d771d..bb6e7cf45c 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -30873,7 +30873,8 @@ static wc_test_ret_t ecc_test_curve_size(WC_RNG* rng, int keySize, int testVerif /* WC_BIGINT doesn't have 0 len well on hardware */ /* Cryptocell has issues with all 0 digest */ #if defined(ECC_SHAMIR) && !defined(WOLFSSL_ASYNC_CRYPT) && \ - !defined(WOLFSSL_CRYPTOCELL) + !defined(WOLFSSL_CRYPTOCELL) && \ + !defined(WC_TEST_NO_ECC_SIGN_VERIFY_ZERO_DIGEST) /* test DSA sign hash with zeros */ for (i = 0; i < (int)ECC_DIGEST_SIZE; i++) { digest[i] = 0; @@ -30910,7 +30911,9 @@ static wc_test_ret_t ecc_test_curve_size(WC_RNG* rng, int keySize, int testVerif TEST_SLEEP(); } #endif /* HAVE_ECC_VERIFY */ -#endif /* ECC_SHAMIR && !WOLFSSL_ASYNC_CRYPT && !WOLFSSL_CRYPTOCELL */ +#endif /* ECC_SHAMIR && !WOLFSSL_ASYNC_CRYPT && !WOLFSSL_CRYPTOCELL + * && !WC_TEST_NO_ECC_SIGN_VERIFY_ZERO_DIGEST + */ /* test DSA sign hash with sequence (0,1,2,3,4,...) */ for (i = 0; i < (int)ECC_DIGEST_SIZE; i++) {