summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Franzki <ifranzki@linux.ibm.com>2023-10-16 14:07:05 +0200
committerMatt Caswell <matt@openssl.org>2023-10-25 09:24:29 +0100
commitdf5f419b14de9ff47082c42f2a2db6557ceca84f (patch)
tree6212f8bc3c3099ede9a38c032f4e3bf5005bbc9e
parent4e09305ee092dea14b7d4feb3fac2889b41428f3 (diff)
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 <n>" is specified. Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Todd Short <todd.short@me.com> (Merged from https://github.com/openssl/openssl/pull/22399)
-rw-r--r--apps/speed.c4
1 files 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);