fuzz/decoder.c: Limit the EVP_PKEY_param_check on DHX keys as well

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24126)

(cherry picked from commit 8d8a014430)
This commit is contained in:
Tomas Mraz 2024-04-12 15:37:58 +02:00
parent a53e93469c
commit f94e5fcc5d
1 changed files with 2 additions and 1 deletions

View File

@ -68,7 +68,8 @@ int FuzzerTestOneInput(const uint8_t *buf, size_t len)
* Param check will take too long time on large DH parameters.
* Skip it.
*/
if (!EVP_PKEY_is_a(pkey, "DH") || EVP_PKEY_get_bits(pkey) <= 8192)
if ((!EVP_PKEY_is_a(pkey, "DH") && !EVP_PKEY_is_a(pkey, "DHX"))
|| EVP_PKEY_get_bits(pkey) <= 8192)
EVP_PKEY_param_check(ctx);
EVP_PKEY_public_check(ctx);