namemap: handle a NULL return when looking for a non-legacy cipher/MD
Fixes
@@ -409,6 +409,7 @@ static void get_legacy_cipher_names(const OBJ_NAME *on, void *arg)
{
const EVP_CIPHER *cipher = (void *)OBJ_NAME_get(on->name, on->type);
+ if (cipher != NULL)
get_legacy_evp_names(NID_undef, EVP_CIPHER_get_type(cipher), NULL, arg);
}
@@ -416,6 +417,7 @@ static void get_legacy_md_names(const OBJ_NAME *on, void *arg)
{
const EVP_MD *md = (void *)OBJ_NAME_get(on->name, on->type);
+ if (md != NULL)
get_legacy_evp_names(0, EVP_MD_get_type(md), NULL, arg);
}
