summaryrefslogtreecommitdiffstats
path: root/crypto/rsa/rsa_gen.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/rsa/rsa_gen.c')
-rw-r--r--crypto/rsa/rsa_gen.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/crypto/rsa/rsa_gen.c b/crypto/rsa/rsa_gen.c
index eda23b5481..4b9296e46c 100644
--- a/crypto/rsa/rsa_gen.c
+++ b/crypto/rsa/rsa_gen.c
@@ -72,11 +72,7 @@ static int rsa_builtin_keygen(RSA *rsa, int bits, int primes, BIGNUM *e_value,
BN_CTX *ctx = NULL;
BN_ULONG bitst = 0;
- /*
- * When generating ridiculously small keys, we can get stuck
- * continually regenerating the same prime values.
- */
- if (bits < 16) {
+ if (bits < RSA_MIN_MODULUS_BITS) {
ok = 0; /* we set our own err */
RSAerr(RSA_F_RSA_BUILTIN_KEYGEN, RSA_R_KEY_SIZE_TOO_SMALL);
goto err;