Latest update.
This commit is contained in:
@@ -25,11 +25,9 @@ int RSA_check_key(const RSA *key)
|
||||
int RSA_check_key_ex(const RSA *key, BN_GENCB *cb)
|
||||
{
|
||||
#ifdef FIPS_MODE
|
||||
if (!(rsa_sp800_56b_check_public(key)
|
||||
&& rsa_sp800_56b_check_private(key)
|
||||
&& rsa_sp800_56b_check_keypair(key, NULL, -1, RSA_bits(key))
|
||||
return 0;
|
||||
|
||||
return rsa_sp800_56b_check_public(key)
|
||||
&& rsa_sp800_56b_check_private(key)
|
||||
&& rsa_sp800_56b_check_keypair(key, NULL, -1, RSA_bits(key));
|
||||
#else
|
||||
BIGNUM *i, *j, *k, *l, *m;
|
||||
BN_CTX *ctx;
|
||||
|
||||
@@ -56,7 +56,7 @@ static int pkey_rsa_init(EVP_PKEY_CTX *ctx)
|
||||
|
||||
if (rctx == NULL)
|
||||
return 0;
|
||||
rctx->nbits = 1024;
|
||||
rctx->nbits = 2048;
|
||||
rctx->primes = RSA_DEFAULT_PRIME_NUM;
|
||||
if (pkey_ctx_is_pss(ctx))
|
||||
rctx->pad_mode = RSA_PKCS1_PSS_PADDING;
|
||||
@@ -89,6 +89,7 @@ static int pkey_rsa_copy(EVP_PKEY_CTX *dst, const EVP_PKEY_CTX *src)
|
||||
dctx->pad_mode = sctx->pad_mode;
|
||||
dctx->md = sctx->md;
|
||||
dctx->mgf1md = sctx->mgf1md;
|
||||
dctx->saltlen = sctx->saltlen;
|
||||
if (sctx->oaep_label) {
|
||||
OPENSSL_free(dctx->oaep_label);
|
||||
dctx->oaep_label = OPENSSL_memdup(sctx->oaep_label, sctx->oaep_labellen);
|
||||
|
||||
Reference in New Issue
Block a user