From: Tomas Mraz Date: Fri, 16 Aug 2024 09:54:00 +0000 (+0200) Subject: speed.c: Return success with -testmode -async_jobs if not ASYNC_is_capable() X-Git-Tag: openssl-3.4.0-alpha1~107 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5111eacd50cf9a415b5891567fc6a930e7beeeff;p=thirdparty%2Fopenssl.git speed.c: Return success with -testmode -async_jobs if not ASYNC_is_capable() Fixes #25203 Reviewed-by: Matt Caswell Reviewed-by: Tom Cosgrove Reviewed-by: Neil Horman (Merged from https://github.com/openssl/openssl/pull/25204) --- diff --git a/apps/speed.c b/apps/speed.c index 81befba9d45..48f91b2213f 100644 --- a/apps/speed.c +++ b/apps/speed.c @@ -2011,14 +2011,17 @@ int speed_main(int argc, char **argv) case OPT_ASYNCJOBS: #ifndef OPENSSL_NO_ASYNC async_jobs = opt_int_arg(); + if (async_jobs > 99999) { + BIO_printf(bio_err, "%s: too many async_jobs\n", prog); + goto opterr; + } if (!ASYNC_is_capable()) { BIO_printf(bio_err, "%s: async_jobs specified but async not supported\n", prog); - goto opterr; - } - if (async_jobs > 99999) { - BIO_printf(bio_err, "%s: too many async_jobs\n", prog); + if (testmode) + /* Return success in the testmode. */ + return 0; goto opterr; } #endif