From df5f419b14de9ff47082c42f2a2db6557ceca84f Mon Sep 17 00:00:00 2001 From: Ingo Franzki Date: Mon, 16 Oct 2023 14:07:05 +0200 Subject: speed: Correct handling of async_jobs for KEM and signature algos Setup the loopargs array for all jobs, not only for the very first one. It may fail with "Could not allocate 0 bytes for sig sign loop" and/or will cause the loop functions to fail silently, because they operate on a NULL PKEY context when "-async_jobs " is specified. Signed-off-by: Ingo Franzki Reviewed-by: Tomas Mraz Reviewed-by: Todd Short (Merged from https://github.com/openssl/openssl/pull/22399) --- apps/speed.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/speed.c b/apps/speed.c index ac86d9e3a9..57aeb67bf8 100644 --- a/apps/speed.c +++ b/apps/speed.c @@ -3830,7 +3830,7 @@ skip_hmac: loopargs[i].kem_rcv_secret[testnum] = rcv_secret; EVP_PKEY_free(pkey); pkey = NULL; - break; + continue; kem_err_break: ERR_print_errors(bio_err); @@ -4010,7 +4010,7 @@ skip_hmac: loopargs[i].sig_sig[testnum] = sig; EVP_PKEY_free(pkey); pkey = NULL; - break; + continue; sig_err_break: ERR_print_errors(bio_err); -- cgit v1.2.3