use EVP_PKEY_id() to get key type

This commit is contained in:
Ryan Mitchell 2021-09-22 10:28:55 -07:00
parent 948e622f6f
commit adc24a0945

View File

@ -365,7 +365,8 @@ SWITCH_DECLARE(switch_bool_t) switch_core_check_dtls_pem(const char *file)
}
bits = EVP_PKEY_bits(pkey);
min_cert_size_bits = EVP_PKEY_EC == pkey->type ? 256 : 4096;
min_cert_size_bits = EVP_PKEY_EC == EVP_PKEY_id(pkey) ? 256 : 4096;
EVP_PKEY_free(pkey);
if (bits < min_cert_size_bits) {