tests: EAP-pwd local failure in crypto_bignum_rand()
Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
6570949b2c
commit
6fe3ee722d
3 changed files with 5 additions and 0 deletions
|
@ -1320,6 +1320,8 @@ int crypto_bignum_to_bin(const struct crypto_bignum *a,
|
|||
|
||||
int crypto_bignum_rand(struct crypto_bignum *r, const struct crypto_bignum *m)
|
||||
{
|
||||
if (TEST_FAIL())
|
||||
return -1;
|
||||
return BN_rand_range((BIGNUM *) r, (const BIGNUM *) m) == 1 ? 0 : -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -1085,6 +1085,8 @@ int crypto_bignum_rand(struct crypto_bignum *r, const struct crypto_bignum *m)
|
|||
int ret = 0;
|
||||
WC_RNG rng;
|
||||
|
||||
if (TEST_FAIL())
|
||||
return -1;
|
||||
if (wc_InitRng(&rng) != 0)
|
||||
return -1;
|
||||
if (mp_rand_prime((mp_int *) r,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue