mirror of
https://github.com/openssl/openssl.git
synced 2024-11-30 21:44:16 +08:00
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)
This commit is contained in:
parent
391d6da43e
commit
f90852093f
@ -10,9 +10,8 @@
|
||||
#include <openssl/rsa.h>
|
||||
#include "internal/refcount.h"
|
||||
|
||||
#define RSA_MAX_PRIME_NUM 16
|
||||
#define RSA_MIN_PRIME_SIZE 64
|
||||
#define RSA_MIN_MODULUS_BITS 512
|
||||
#define RSA_MAX_PRIME_NUM 5
|
||||
#define RSA_MIN_MODULUS_BITS 512
|
||||
|
||||
typedef struct rsa_prime_info_st {
|
||||
BIGNUM *r;
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user