X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=crypto%2Frsa%2Frsa_lib.c;h=d3a602f0a5be91bb9944b03c03e6b77760850f9d;hp=d09dbd4a33c921be3441847be70e85bdc57c468e;hb=12c2fe8d53fd43559ea862c9babfc2abf3c65299;hpb=28143c66e138b843b41280c0b9763f28553dc355 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,