Minor cleanup of the rsa mp limits code
[openssl.git] / crypto / rsa / rsa_mp.c
index 8ff4b636256d9e01f4ce7d56b5a78c6c09fe2446..97a09f1387774927d803c0526b116574a5a5078a 100644 (file)
@@ -105,5 +105,8 @@ int rsa_multip_cap(int bits)
     else if (bits < 8192)
         cap = 4;
 
+    if (cap > RSA_MAX_PRIME_NUM)
+        cap = RSA_MAX_PRIME_NUM;
+
     return cap;
 }