summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorBen Laurie <ben@openssl.org>2012-12-07 19:47:47 +0100
committerBen Laurie <ben@openssl.org>2012-12-07 19:47:47 +0100
commit30c278aa6bb614f4cfc5a26c7cbe66ad090f6896 (patch)
tree2b944cd0b8d7b29691ce91b67ce14634d4972964 /apps
parenttypo (diff)
downloadopenssl-30c278aa6bb614f4cfc5a26c7cbe66ad090f6896.tar.xz
openssl-30c278aa6bb614f4cfc5a26c7cbe66ad090f6896.zip
Fix OCSP checking.
Diffstat (limited to 'apps')
-rw-r--r--apps/ocsp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/ocsp.c b/apps/ocsp.c
index 01847dfad7..ce9bfa52d6 100644
--- a/apps/ocsp.c
+++ b/apps/ocsp.c
@@ -866,6 +866,8 @@ int MAIN(int argc, char **argv)
goto end;
}
+ ret = 0;
+
if (!noverify)
{
if (req && ((i = OCSP_check_nonce(req, bs)) <= 0))
@@ -875,17 +877,17 @@ int MAIN(int argc, char **argv)
else
{
BIO_printf(bio_err, "Nonce Verify error\n");
+ ret = 1;
goto end;
}
}
i = OCSP_basic_verify(bs, verify_other, store, verify_flags);
- if (i < 0) i = OCSP_basic_verify(bs, NULL, store, 0);
-
if(i <= 0)
{
BIO_printf(bio_err, "Response Verify Failure\n");
ERR_print_errors(bio_err);
+ ret = 1;
}
else
BIO_printf(bio_err, "Response verify OK\n");
@@ -893,9 +895,7 @@ int MAIN(int argc, char **argv)
}
if (!print_ocsp_summary(out, bs, req, reqnames, ids, nsec, maxage))
- goto end;
-
- ret = 0;
+ ret = 1;
end:
ERR_print_errors(bio_err);