Latest update.

This commit is contained in:
2020-03-03 19:16:19 +09:00
parent f85de4da03
commit b412d79e8b
310 changed files with 32765 additions and 19720 deletions
+7 -1
View File
@@ -1114,7 +1114,13 @@ static int rsa_pkey_export_to(const EVP_PKEY *from, void *to_keydata,
numexps = sk_BIGNUM_const_num(exps);
numcoeffs = sk_BIGNUM_const_num(coeffs);
if (numprimes < 2 || numexps < 2 || numcoeffs < 1)
/*
* It's permisssible to have zero primes, i.e. no CRT params.
* Otherwise, there must be at least two, as many exponents,
* and one coefficient less.
*/
if (numprimes != 0
&& (numprimes < 2 || numexps < 2 || numcoeffs < 1))
goto err;
/* assert that an OSSL_PARAM_BLD has enough space. */