forked from wolfSSL/wolfssl
ECC without Shamir has issues testing all zero's digest, so disable this test if not using Shamir method. Fixed comment about "NO_ECC_SECP".
This commit is contained in:
@ -47,7 +47,7 @@ Possible ECC enable options:
|
||||
|
||||
/*
|
||||
ECC Curve Types:
|
||||
* NO_ECC_SECP Disables SECP curves default: on
|
||||
* NO_ECC_SECP Disables SECP curves default: off (not defined)
|
||||
* HAVE_ECC_SECPR2 Enables SECP R2 curves default: off
|
||||
* HAVE_ECC_SECPR3 Enables SECP R3 curves default: off
|
||||
* HAVE_ECC_BRAINPOOL Enables Brainpool curves default: off
|
||||
|
@ -6822,11 +6822,11 @@ static int ecc_test_curve_size(WC_RNG* rng, int keySize, int testVerifyCount,
|
||||
#endif /* HAVE_ECC_KEY_EXPORT */
|
||||
|
||||
#ifdef HAVE_ECC_SIGN
|
||||
#ifdef ECC_SHAMIR
|
||||
/* test DSA sign hash with zeros */
|
||||
for (i = 0; i < (int)sizeof(digest); i++) {
|
||||
digest[i] = 0;
|
||||
}
|
||||
digest[i-1] = 1; /* Set last digit to non-zero value */
|
||||
|
||||
x = sizeof(sig);
|
||||
ret = wc_ecc_sign_hash(digest, sizeof(digest), sig, &x, rng, &userA);
|
||||
@ -6844,6 +6844,7 @@ static int ecc_test_curve_size(WC_RNG* rng, int keySize, int testVerifyCount,
|
||||
ERROR_OUT(-1016, done);
|
||||
}
|
||||
#endif /* HAVE_ECC_VERIFY */
|
||||
#endif /* ECC_SHAMIR */
|
||||
|
||||
/* test DSA sign hash with sequence (0,1,2,3,4,...) */
|
||||
for (i = 0; i < (int)sizeof(digest); i++) {
|
||||
|
Reference in New Issue
Block a user