summaryrefslogtreecommitdiffstats
path: root/test/exptest.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2016-08-08 22:12:28 -0400
committerRich Salz <rsalz@openssl.org>2016-08-10 10:07:37 -0400
commit2301d91dd58d9827865e360d616291f2549ec5bf (patch)
tree0b60f1e481fbf8c4afc49f493d59a3c8961febb8 /test/exptest.c
parentf67cbb74437842a0f88f84f43a0faa968ca77b35 (diff)
Change callers to use the new constants.
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1429)
Diffstat (limited to 'test/exptest.c')
-rw-r--r--test/exptest.c8
1 files changed, 4 insertions, 4 deletions
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);