From: Gopal Sharma <67860577+gsharma-ad@users.noreply.github.com> Date: Tue, 16 Jan 2024 09:20:12 +0000 (+0530) Subject: Removed hard coded value for cap in function ossl_rsa_multip_cap X-Git-Tag: openssl-3.4.0-alpha1~510 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a5e93f1c5b88528645d34ae176ad9a0dd94edd2b;p=thirdparty%2Fopenssl.git Removed hard coded value for cap in function ossl_rsa_multip_cap As suggested at https://github.com/openssl/openssl/pull/23280#discussion_r1452113014, removing hard coded value for cap. CLA: trivial Reviewed-by: Tom Cosgrove Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/23311) --- diff --git a/crypto/rsa/rsa_mp.c b/crypto/rsa/rsa_mp.c index cb2fb7d1e8e..ddb73383394 100644 --- a/crypto/rsa/rsa_mp.c +++ b/crypto/rsa/rsa_mp.c @@ -97,7 +97,7 @@ int ossl_rsa_multip_calc_product(RSA *rsa) int ossl_rsa_multip_cap(int bits) { - int cap = 5; + int cap = RSA_MAX_PRIME_NUM; if (bits < 1024) cap = 2;