summaryrefslogtreecommitdiffstats
path: root/crypto/rsa
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2021-03-26 16:49:27 +0000
committerTomas Mraz <tomas@openssl.org>2021-03-30 19:22:33 +0200
commitc6b09ea0fe23a572a781681b3c1f436e8b0932fe (patch)
tree7faff1aad786605cd05cc823b1da74034e34c7e0 /crypto/rsa
parent6635ea531e9f7709e5880dd77fd4c3403a5c3db7 (diff)
Fix change in behaviour of EVP_PKEY_CTRL_RSA_KEYGEN_BITS
In 1.1.1 the ctrl EVP_PKEY_CTRL_RSA_KEYGEN_BITS would fail immediately if the number of bits was too small. In 3.0 it always succeeds, and only fails later during the key generation stage. We fix that so that it fails early like it used to in 1.1.1. Note that in 1.1.1 it fails with a -2 return code. That is not the case in 3.0 and has not been addressed here (see #14442) Fixes #14443 Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14702)
Diffstat (limited to 'crypto/rsa')
-rw-r--r--crypto/rsa/rsa_local.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/crypto/rsa/rsa_local.h b/crypto/rsa/rsa_local.h
index 6979adfcd1..ea70da05ad 100644
--- a/crypto/rsa/rsa_local.h
+++ b/crypto/rsa/rsa_local.h
@@ -14,7 +14,6 @@
#include "crypto/rsa.h"
#define RSA_MAX_PRIME_NUM 5
-#define RSA_MIN_MODULUS_BITS 512
typedef struct rsa_prime_info_st {
BIGNUM *r;