summaryrefslogtreecommitdiffstats
path: root/apps/ocsp.c
diff options
context:
space:
mode:
authorBen Laurie <ben@openssl.org>2012-12-14 12:53:53 +0000
committerBen Laurie <ben@openssl.org>2012-12-14 12:53:53 +0000
commitd65b8b2162f33ac0d53dace588a0847ed827626c (patch)
tree7fc5f91d14728ccb6934605677bd537b847e6998 /apps/ocsp.c
parent5dca1e338c068931a1cdcb76d8db303a3d3dce25 (diff)
Backport OCSP fixes.
Diffstat (limited to 'apps/ocsp.c')
-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);