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:39:42 +0000 (08:39 +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/5998)

apps/ocsp.c

index 83461c7cb5ee6fc3dcd6cbe0448ab2a74edc48d6..eb822c2696eb5cff877f109c4f89c870cc1f1390 100644 (file)
@@ -697,10 +697,8 @@ redo_accept:
     if (i != OCSP_RESPONSE_STATUS_SUCCESSFUL) {
         BIO_printf(out, "Responder Error: %s (%d)\n",
                    OCSP_response_status_str(i), i);
-        if (!ignore_err) {
-                ret = 0;
+        if (!ignore_err)
                 goto end;
-        }
     }
 
     if (resp_text)