From: Ingo Franzki Date: Mon, 16 Oct 2023 12:07:05 +0000 (+0200) Subject: speed: Correct handling of async_jobs for KEM and signature algos X-Git-Tag: openssl-3.2.0-beta1~20 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=df5f419b14de9ff47082c42f2a2db6557ceca84f;p=thirdparty%2Fopenssl.git 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) --- diff --git a/apps/speed.c b/apps/speed.c index ac86d9e3a9a..57aeb67bf89 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);