]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
speed.c: Return success with -testmode -async_jobs if not ASYNC_is_capable()
authorTomas Mraz <tomas@openssl.org>
Fri, 16 Aug 2024 09:54:00 +0000 (11:54 +0200)
committerTomas Mraz <tomas@openssl.org>
Mon, 19 Aug 2024 07:06:33 +0000 (09:06 +0200)
Fixes #25203

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25204)

apps/speed.c

index 81befba9d458c48e135004089d602b94de6c3536..48f91b2213f03affae0a2213fa21d56d55e8f37d 100644 (file)
@@ -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