summaryrefslogtreecommitdiffstats
path: root/crypto/bn/bn_rand.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 /crypto/bn/bn_rand.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 'crypto/bn/bn_rand.c')
-rw-r--r--crypto/bn/bn_rand.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/bn/bn_rand.c b/crypto/bn/bn_rand.c
index 9c0a4eef06..5ad80507b0 100644
--- a/crypto/bn/bn_rand.c
+++ b/crypto/bn/bn_rand.c
@@ -130,7 +130,7 @@ static int bn_rand_range(int pseudo, BIGNUM *r, const BIGNUM *range)
* than range
*/
do {
- if (!bn_rand(r, n + 1, -1, 0))
+ if (!bn_rand(r, n + 1, BN_RAND_TOP_ANY, BN_RAND_BOTTOM_ANY))
return 0;
/*
* If r < 3*range, use r := r MOD range (which is either r, r -
@@ -156,7 +156,7 @@ static int bn_rand_range(int pseudo, BIGNUM *r, const BIGNUM *range)
} else {
do {
/* range = 11..._2 or range = 101..._2 */
- if (!bn_rand(r, n, -1, 0))
+ if (!bn_rand(r, n, BN_RAND_TOP_ANY, BN_RAND_BOTTOM_ANY))
return 0;
if (!--count) {