Fix ocsp app exit code
authorMatt Caswell <matt@openssl.org>
Wed, 18 Apr 2018 10:07:18 +0000 (11:07 +0100)
committerMatt Caswell <matt@openssl.org>
Thu, 19 Apr 2018 07:46:48 +0000 (08:46 +0100)
If we run the ocsp command line app and the responder returns a
non-successful status code then the app should exit with a failure code.

Based on an original patch by Tatsuhiro Tsujikawa.

Fixes #2387

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5999)

(cherry picked from commit 2add645dfc364cfc609e6138de1bf43c217bb557)

apps/ocsp.c

index 654eebcbfc15125ed9a346b4957110524721a3c6..352bdf14b0473fccdaeb1e36fadd623c168718e9 100644 (file)
@@ -787,7 +787,6 @@ int MAIN(int argc, char **argv)
                    OCSP_response_status_str(i), i);
         if (ignore_err)
             goto redo_accept;
-        ret = 0;
         goto end;
     }