]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix exit code for s_time when -new command line switch specified
authorNeil Horman <nhorman@openssl.org>
Thu, 19 Jun 2025 16:38:41 +0000 (12:38 -0400)
committerNeil Horman <nhorman@openssl.org>
Fri, 20 Jun 2025 18:56:44 +0000 (14:56 -0400)
When operating with the -new switch in apps/openssl s_time, we neglect
to set the exit code properly, and so the app exits with a code of 1
rather than 0 as expected

Fixes #27856

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27857)

apps/s_time.c

index 0d5bd12287292934fa26e8b3707d62b5e3cd6a03..96788b9b93bd4428cecbd7482a2b0f0717dc0ae0 100644 (file)
@@ -323,8 +323,10 @@ int s_time_main(int argc, char **argv)
      */
 
  next:
-    if (!(perform & 2))
+    if (!(perform & 2)) {
+        ret = 0;
         goto end;
+    }
     printf("\n\nNow timing with session id reuse.\n");
 
     /* Get an SSL object so we can reuse the session id */