nghttpx: Call OCSP_response_get1_basic only when OCSP status is successful

This commit is contained in:
Tatsuhiro Tsujikawa 2018-09-16 22:19:27 +09:00
parent 3575a1325e
commit a63558a1eb
1 changed files with 5 additions and 0 deletions

View File

@ -1907,6 +1907,11 @@ int verify_ocsp_response(SSL_CTX *ssl_ctx, const uint8_t *ocsp_resp,
}
auto resp_deleter = defer(OCSP_RESPONSE_free, resp);
if (OCSP_response_status(resp) != OCSP_RESPONSE_STATUS_SUCCESSFUL) {
LOG(ERROR) << "OCSP response status is not successful";
return -1;
}
ERR_clear_error();
auto bs = OCSP_response_get1_basic(resp);