summaryrefslogtreecommitdiffstats
path: root/crypto/rsa
diff options
context:
space:
mode:
authorUlf Möller <ulf@openssl.org>2001-02-20 00:43:59 +0000
committerUlf Möller <ulf@openssl.org>2001-02-20 00:43:59 +0000
commit12c2fe8d53fd43559ea862c9babfc2abf3c65299 (patch)
treeaf83ab96c9aad2bc15a07e4e1a44dfe0e0b0f3e2 /crypto/rsa
parent28143c66e138b843b41280c0b9763f28553dc355 (diff)
Use BN_rand_range().
Diffstat (limited to 'crypto/rsa')
-rw-r--r--crypto/rsa/rsa_lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/rsa/rsa_lib.c b/crypto/rsa/rsa_lib.c
index d09dbd4a33..d3a602f0a5 100644
--- a/crypto/rsa/rsa_lib.c
+++ b/crypto/rsa/rsa_lib.c
@@ -325,7 +325,7 @@ int RSA_blinding_on(RSA *rsa, BN_CTX *p_ctx)
BN_CTX_start(ctx);
A = BN_CTX_get(ctx);
- if (!BN_rand(A,BN_num_bits(rsa->n)-1,1,0)) goto err;
+ if (!BN_rand_range(A,rsa->n)) goto err;
if ((Ai=BN_mod_inverse(NULL,A,rsa->n,ctx)) == NULL) goto err;
if (!ENGINE_get_RSA(rsa->engine)->bn_mod_exp(A,A,