openssl speed fails in FIPS mode
authorDmitry Belyavskiy <beldmit@gmail.com>
Tue, 21 Dec 2021 15:52:25 +0000 (16:52 +0100)
committerPauli <pauli@openssl.org>
Tue, 23 Aug 2022 00:21:50 +0000 (10:21 +1000)
...because it uses md5 for HMAC tests. Skip md5 in case of its
unavailability.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17331)

(cherry picked from commit c63e8637fd79c826b3c438cf99cf7f1b293e8318)

apps/speed.c

index c8ad19a2bf9d38ed626338e9f3b5562aedb24a60..b8824bdb8cce4078d96f733199efe25a1c7deb73 100644 (file)
@@ -2007,7 +2007,7 @@ int speed_main(int argc, char **argv)
                 goto end;
 
             if (!EVP_MAC_CTX_set_params(loopargs[i].mctx, params))
-                goto end;
+                goto skip_hmac; /* Digest not found */
         }
         for (testnum = 0; testnum < size_num; testnum++) {
             print_message(names[D_HMAC], c[D_HMAC][testnum], lengths[testnum],
@@ -2024,7 +2024,7 @@ int speed_main(int argc, char **argv)
         EVP_MAC_free(mac);
         mac = NULL;
     }
-
+skip_hmac:
     if (doit[D_CBC_DES]) {
         int st = 1;