aboutsummaryrefslogtreecommitdiff
path: root/crypto/openssl/apps/ocsp.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssl/apps/ocsp.c')
-rw-r--r--crypto/openssl/apps/ocsp.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/crypto/openssl/apps/ocsp.c b/crypto/openssl/apps/ocsp.c
index 79b76a2ca747..95a95f56cb99 100644
--- a/crypto/openssl/apps/ocsp.c
+++ b/crypto/openssl/apps/ocsp.c
@@ -662,7 +662,8 @@ redo_accept:
resp =
OCSP_response_create(OCSP_RESPONSE_STATUS_MALFORMEDREQUEST,
NULL);
- send_ocsp_response(cbio, resp);
+ if (resp != NULL)
+ send_ocsp_response(cbio, resp);
}
goto done_resp;
}
@@ -764,16 +765,18 @@ redo_accept:
BIO_free(derbio);
}
- i = OCSP_response_status(resp);
- if (i != OCSP_RESPONSE_STATUS_SUCCESSFUL) {
- BIO_printf(out, "Responder Error: %s (%d)\n",
- OCSP_response_status_str(i), i);
- if (!ignore_err)
+ if (resp != NULL) {
+ i = OCSP_response_status(resp);
+ if (i != OCSP_RESPONSE_STATUS_SUCCESSFUL) {
+ BIO_printf(out, "Responder Error: %s (%d)\n",
+ OCSP_response_status_str(i), i);
+ if (!ignore_err)
goto end;
- }
+ }
- if (resp_text)
- OCSP_RESPONSE_print(out, resp, 0);
+ if (resp_text)
+ OCSP_RESPONSE_print(out, resp, 0);
+ }
/* If running as responder don't verify our own response */
if (cbio != NULL) {