mirror of https://github.com/moparisthebest/curl
openssl: try to avoid accessing OCSP structs when possible
This commit is contained in:
parent
9e8f9dbdd3
commit
8854f8d45a
|
@ -1390,17 +1390,15 @@ static CURLcode verifystatus(struct connectdata *conn,
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(i = 0; i < sk_OCSP_SINGLERESP_num(br->tbsResponseData->responses); i++) {
|
for(i = 0; i < OCSP_resp_count(br); i++) {
|
||||||
int cert_status, crl_reason;
|
int cert_status, crl_reason;
|
||||||
OCSP_SINGLERESP *single = NULL;
|
OCSP_SINGLERESP *single = NULL;
|
||||||
|
|
||||||
ASN1_GENERALIZEDTIME *rev, *thisupd, *nextupd;
|
ASN1_GENERALIZEDTIME *rev, *thisupd, *nextupd;
|
||||||
|
|
||||||
if(!sk_OCSP_SINGLERESP_value(br->tbsResponseData->responses, i))
|
if(!(single = OCSP_resp_get0(br, i)))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
single = sk_OCSP_SINGLERESP_value(br->tbsResponseData->responses, i);
|
|
||||||
|
|
||||||
cert_status = OCSP_single_get0_status(single, &crl_reason, &rev,
|
cert_status = OCSP_single_get0_status(single, &crl_reason, &rev,
|
||||||
&thisupd, &nextupd);
|
&thisupd, &nextupd);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue