summaryrefslogtreecommitdiffstats
path: root/crypto/bn/bn_x931p.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_x931p.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_x931p.c')
-rw-r--r--crypto/bn/bn_x931p.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/bn/bn_x931p.c b/crypto/bn/bn_x931p.c
index d863386ef4..516ad34ca7 100644
--- a/crypto/bn/bn_x931p.c
+++ b/crypto/bn/bn_x931p.c
@@ -170,14 +170,14 @@ int BN_X931_generate_Xpq(BIGNUM *Xp, BIGNUM *Xq, int nbits, BN_CTX *ctx)
* - 1. By setting the top two bits we ensure that the lower bound is
* exceeded.
*/
- if (!BN_rand(Xp, nbits, 1, 0))
+ if (!BN_rand(Xp, nbits, BN_RAND_TOP_TWO, BN_RAND_BOTTOM_ANY))
goto err;
BN_CTX_start(ctx);
t = BN_CTX_get(ctx);
for (i = 0; i < 1000; i++) {
- if (!BN_rand(Xq, nbits, 1, 0))
+ if (!BN_rand(Xq, nbits, BN_RAND_TOP_TWO, BN_RAND_BOTTOM_ANY))
goto err;
/* Check that |Xp - Xq| > 2^(nbits - 100) */
BN_sub(t, Xp, Xq);
@@ -218,9 +218,9 @@ int BN_X931_generate_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2,
if (!Xp2)
Xp2 = BN_CTX_get(ctx);
- if (!BN_rand(Xp1, 101, 0, 0))
+ if (!BN_rand(Xp1, 101, BN_RAND_TOP_ONE, BN_RAND_BOTTOM_ANY))
goto error;
- if (!BN_rand(Xp2, 101, 0, 0))
+ if (!BN_rand(Xp2, 101, BN_RAND_TOP_ONE, BN_RAND_BOTTOM_ANY))
goto error;
if (!BN_X931_derive_prime_ex(p, p1, p2, Xp, Xp1, Xp2, e, ctx, cb))
goto error;