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;
}
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) {