diff options
author | Rich Salz <rsalz@openssl.org> | 2016-08-09 04:12:28 +0200 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-08-10 16:07:37 +0200 |
commit | 2301d91dd58d9827865e360d616291f2549ec5bf (patch) | |
tree | 0b60f1e481fbf8c4afc49f493d59a3c8961febb8 /test/exptest.c | |
parent | Add #defines for magic numbers in API. (diff) | |
download | openssl-2301d91dd58d9827865e360d616291f2549ec5bf.tar.xz openssl-2301d91dd58d9827865e360d616291f2549ec5bf.zip |
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.c | 8 |
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); |