Simplify BN_rand_range
This commit is contained in:
@@ -180,7 +180,7 @@ static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp)
|
||||
|
||||
/* Get random k */
|
||||
do
|
||||
if (!BN_rand_range(&k, NULL, dsa->q)) goto err;
|
||||
if (!BN_rand_range(&k, dsa->q)) goto err;
|
||||
while (BN_is_zero(&k));
|
||||
|
||||
if ((dsa->method_mont_p == NULL) && (dsa->flags & DSA_FLAG_CACHE_MONT_P))
|
||||
|
Reference in New Issue
Block a user