Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24126)
* 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);