Flip ordering back
authorRich Salz <rsalz@akamai.com>
Fri, 16 Apr 2021 15:29:35 +0000 (11:29 -0400)
committerDmitry Belyavskiy <beldmit@gmail.com>
Tue, 20 Apr 2021 08:12:29 +0000 (10:12 +0200)
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/14219)

apps/lib/opt.c

index f6324ba323cbb69c323118e3e8a8bf696f4100dc..d22a884e6715bd6fa61e033aab5cf099f5a148fb 100644 (file)
@@ -373,10 +373,10 @@ int opt_cipher(const char *name, EVP_CIPHER **cipherp)
  */
 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,