diff options
author | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2017-12-11 16:10:36 +0100 |
---|---|---|
committer | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2017-12-13 17:29:01 +0100 |
commit | f90852093f149ae942a77c2c27d2a61888cff8e9 (patch) | |
tree | 1fc036ace6026e91a0e694b7e54b0d7ed743480a /crypto/rsa/rsa_mp.c | |
parent | 391d6da43eb8f8c87d6f7a8b7f5836f1a0d30fc0 (diff) |
Minor cleanup of the rsa mp limits code
Reduce RSA_MAX_PRIME_NUM to 5.
Remove no longer used RSA_MIN_PRIME_SIZE.
Make rsa_multip_cap honor RSA_MAX_PRIME_NUM.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4905)
Diffstat (limited to 'crypto/rsa/rsa_mp.c')
-rw-r--r-- | crypto/rsa/rsa_mp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/rsa/rsa_mp.c b/crypto/rsa/rsa_mp.c index 8ff4b63625..97a09f1387 100644 --- a/crypto/rsa/rsa_mp.c +++ b/crypto/rsa/rsa_mp.c @@ -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; } |