Blame SOURCES/0035-speed-skip-unavailable-dgst.patch

bf760f
diff -up openssl-3.0.0/apps/speed.c.beldmit openssl-3.0.0/apps/speed.c
bf760f
--- openssl-3.0.0/apps/speed.c.beldmit	2021-12-21 15:14:04.210431584 +0100
bf760f
+++ openssl-3.0.0/apps/speed.c	2021-12-21 15:46:05.554085125 +0100
bf760f
@@ -547,6 +547,9 @@ static int EVP_MAC_loop(int algindex, vo
bf760f
     for (count = 0; COND(c[algindex][testnum]); count++) {
bf760f
         size_t outl;
bf760f
 
bf760f
+        if (mctx == NULL)
bf760f
+            return -1;
bf760f
+
bf760f
         if (!EVP_MAC_init(mctx, NULL, 0, NULL)
bf760f
             || !EVP_MAC_update(mctx, buf, lengths[testnum])
bf760f
             || !EVP_MAC_final(mctx, mac, &outl, sizeof(mac)))
bf760f
@@ -1922,8 +1925,10 @@ int speed_main(int argc, char **argv)
bf760f
             if (loopargs[i].mctx == NULL)
bf760f
                 goto end;
bf760f
 
bf760f
-            if (!EVP_MAC_CTX_set_params(loopargs[i].mctx, params))
bf760f
-                goto end;
bf760f
+            if (!EVP_MAC_CTX_set_params(loopargs[i].mctx, params)) {
bf760f
+                EVP_MAC_CTX_free(loopargs[i].mctx);
bf760f
+                loopargs[i].mctx = NULL;
bf760f
+            }
bf760f
         }
bf760f
         for (testnum = 0; testnum < size_num; testnum++) {
bf760f
             print_message(names[D_HMAC], c[D_HMAC][testnum], lengths[testnum],