Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/14219)
*/
int opt_md(const char *name, EVP_MD **mdp)
{
- *mdp = EVP_MD_fetch(NULL, name, NULL);
+ *mdp = (EVP_MD *)EVP_get_digestbyname(name);
if (*mdp != NULL)
return 1;
- *mdp = (EVP_MD *)EVP_get_digestbyname(name);
+ *mdp = EVP_MD_fetch(NULL, name, NULL);
if (*mdp != NULL)
return 1;
opt_printf_stderr("%s: Unknown option or message digest: %s\n", prog,