]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Removed hard coded value for cap in function ossl_rsa_multip_cap
authorGopal Sharma <67860577+gsharma-ad@users.noreply.github.com>
Tue, 16 Jan 2024 09:20:12 +0000 (14:50 +0530)
committerTomas Mraz <tomas@openssl.org>
Thu, 30 May 2024 12:46:06 +0000 (14:46 +0200)
As suggested at https://github.com/openssl/openssl/pull/23280#discussion_r1452113014, removing hard coded value for cap.

CLA: trivial

Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/23311)

crypto/rsa/rsa_mp.c

index cb2fb7d1e8e91b19d743ee6a66c8968ccd8cf1d3..ddb73383394ff008928a12c919773323f21730ff 100644 (file)
@@ -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;