Skip to content

Commit 6716a2e

Browse files
committed
Ensure basic response is cleaned up
1 parent 1ad8799 commit 6716a2e

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

native/src/sslutils.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,11 +1040,12 @@ static int process_ocsp_response(OCSP_REQUEST *ocsp_req, OCSP_RESPONSE *ocsp_res
10401040

10411041
certid = OCSP_cert_to_id(NULL, cert, issuer);
10421042
if (certid == NULL) {
1043-
return OCSP_STATUS_UNKNOWN;
1043+
X509_STORE_CTX_set_error(ctx, X509_V_ERR_OCSP_RESP_INVALID);
1044+
o = OCSP_STATUS_UNKNOWN;
1045+
goto clean_bs;
10441046
}
1045-
ss = OCSP_resp_get0(bs, OCSP_resp_find(bs, certid, -1)); /* find by serial number and get the matching response */
1046-
10471047

1048+
ss = OCSP_resp_get0(bs, OCSP_resp_find(bs, certid, -1)); /* find by serial number and get the matching response */
10481049
i = OCSP_single_get0_status(ss, NULL, NULL, NULL, NULL);
10491050
if (i == V_OCSP_CERTSTATUS_GOOD)
10501051
o = OCSP_STATUS_OK;

0 commit comments

Comments
 (0)