Skip to content

Commit

Permalink
fuzz/decoder.c: Limit the EVP_PKEY_param_check on DHX keys as well
Browse files Browse the repository at this point in the history
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from #24126)

(cherry picked from commit 8d8a014)
  • Loading branch information
t8m committed Apr 17, 2024
1 parent a53e934 commit f94e5fc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fuzz/decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f94e5fc

Please sign in to comment.