aboutsummaryrefslogtreecommitdiff
path: root/apps/ocsp.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2002-06-13 12:56:27 +0000
committerDr. Stephen Henson <steve@openssl.org>2002-06-13 12:56:27 +0000
commit99889b46c95711397389959a093f5556ebb39e4b (patch)
tree108a05f594dd4fc20a9f51e8b5d9fca0d7703edc /apps/ocsp.c
parent82869b3c8dc116481aaf28d14dba390af633f91e (diff)
downloadopenssl-99889b46c95711397389959a093f5556ebb39e4b.zip
openssl-99889b46c95711397389959a093f5556ebb39e4b.tar.gz
openssl-99889b46c95711397389959a093f5556ebb39e4b.tar.bz2
Fix ext_dat.h extension ordering.
Reinstate -reqout code. Avoid coredump in ocsp if setup_verify fails. Fix typo in ocsp usage message.
Diffstat (limited to 'apps/ocsp.c')
-rw-r--r--apps/ocsp.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/apps/ocsp.c b/apps/ocsp.c
index c87edbc..50af2a5 100644
--- a/apps/ocsp.c
+++ b/apps/ocsp.c
@@ -553,8 +553,8 @@ int MAIN(int argc, char **argv)
BIO_printf (bio_err, "-port num port to run responder on\n");
BIO_printf (bio_err, "-index file certificate status index file\n");
BIO_printf (bio_err, "-CA file CA certificate\n");
- BIO_printf (bio_err, "-rsigner file responder certificate to sign requests with\n");
- BIO_printf (bio_err, "-rkey file responder key to sign requests with\n");
+ BIO_printf (bio_err, "-rsigner file responder certificate to sign responses with\n");
+ BIO_printf (bio_err, "-rkey file responder key to sign responses with\n");
BIO_printf (bio_err, "-rother file other certificates to include in response\n");
BIO_printf (bio_err, "-resp_no_certs don't include any certificates in response\n");
BIO_printf (bio_err, "-nmin n number of minutes before next update\n");
@@ -676,6 +676,18 @@ int MAIN(int argc, char **argv)
if (req_text && req) OCSP_REQUEST_print(out, req, 0);
+ if (reqout)
+ {
+ derbio = BIO_new_file(reqout, "wb");
+ if(!derbio)
+ {
+ BIO_printf(bio_err, "Error opening file %s\n", reqout);
+ goto end;
+ }
+ i2d_OCSP_REQUEST_bio(derbio, req);
+ BIO_free(derbio);
+ }
+
if (ridx_filename && (!rkey || !rsigner || !rca_cert))
{
BIO_printf(bio_err, "Need a responder certificate, key and CA for this operation!\n");
@@ -809,6 +821,8 @@ int MAIN(int argc, char **argv)
if (!store)
store = setup_verify(bio_err, CAfile, CApath);
+ if (!store)
+ goto end;
if (verify_certfile)
{
verify_other = load_certs(bio_err, verify_certfile, FORMAT_PEM,