DSA_generate_parameters_ex: use the old method for all small keys

Fixes #14733

Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14744)
This commit is contained in:
Tomas Mraz 2021-03-30 13:23:12 +02:00
parent 492bc359dc
commit 1f99b53fe5

View File

@ -58,7 +58,7 @@ int DSA_generate_parameters_ex(DSA *dsa, int bits,
return 0; return 0;
/* The old code used FIPS 186-2 DSA Parameter generation */ /* The old code used FIPS 186-2 DSA Parameter generation */
if (bits <= 1024 && seed_len == 20) { if (bits < 2048 && seed_len <= 20) {
if (!ossl_dsa_generate_ffc_parameters(dsa, DSA_PARAMGEN_TYPE_FIPS_186_2, if (!ossl_dsa_generate_ffc_parameters(dsa, DSA_PARAMGEN_TYPE_FIPS_186_2,
bits, 160, cb)) bits, 160, cb))
return 0; return 0;