Skip to content

Commit

Permalink
add non-feature-specific macro to disable ECC sign/verify of all-zero…
Browse files Browse the repository at this point in the history
… digest
  • Loading branch information
bigbrett committed Oct 28, 2024
1 parent ea3a79e commit cac11e3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions wolfcrypt/test/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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++) {
Expand Down

0 comments on commit cac11e3

Please sign in to comment.