diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/bntest.c | 2 | ||||
-rw-r--r-- | test/exptest.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/test/bntest.c b/test/bntest.c index 763a8c29f9..3507b31e1d 100644 --- a/test/bntest.c +++ b/test/bntest.c @@ -1220,7 +1220,7 @@ int test_gf2m_add(BIO *bp) c = BN_new(); for (i = 0; i < num0; i++) { - BN_rand(a, 512, 0, 0); + BN_rand(a, 512, BN_RAND_TOP_ONE, BN_RAND_BOTTOM_ANY); BN_copy(b, BN_value_one()); a->neg = rand_neg(); b->neg = rand_neg(); diff --git a/test/exptest.c b/test/exptest.c index f7df9cf165..e58e0c29aa 100644 --- a/test/exptest.c +++ b/test/exptest.c @@ -72,7 +72,7 @@ static int test_exp_mod_zero() if (!r) goto err; - if (!BN_rand(a, 1024, 0, 0)) + if (!BN_rand(a, 1024, BN_RAND_TOP_ONE, BN_RAND_BOTTOM_ANY)) goto err; if (!BN_mod_exp(r, a, p, m, ctx)) @@ -168,15 +168,15 @@ int main(int argc, char *argv[]) for (i = 0; i < 200; i++) { RAND_bytes(&c, 1); c = (c % BN_BITS) - BN_BITS2; - BN_rand(a, NUM_BITS + c, 0, 0); + BN_rand(a, NUM_BITS + c, BN_RAND_TOP_ONE, BN_RAND_BOTTOM_ANY); RAND_bytes(&c, 1); c = (c % BN_BITS) - BN_BITS2; - BN_rand(b, NUM_BITS + c, 0, 0); + BN_rand(b, NUM_BITS + c, BN_RAND_TOP_ONE, BN_RAND_BOTTOM_ANY); RAND_bytes(&c, 1); c = (c % BN_BITS) - BN_BITS2; - BN_rand(m, NUM_BITS + c, 0, 1); + BN_rand(m, NUM_BITS + c, BN_RAND_TOP_ONE, BN_RAND_BOTTOM_ODD); BN_mod(a, a, m, ctx); BN_mod(b, b, m, ctx); |