openssl: try to avoid accessing OCSP structs when possible
This commit is contained in:
Родитель
9e8f9dbdd3
Коммит
8854f8d45a
|
@ -1390,17 +1390,15 @@ static CURLcode verifystatus(struct connectdata *conn,
|
|||
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;
|
||||
OCSP_SINGLERESP *single = NULL;
|
||||
|
||||
ASN1_GENERALIZEDTIME *rev, *thisupd, *nextupd;
|
||||
|
||||
if(!sk_OCSP_SINGLERESP_value(br->tbsResponseData->responses, i))
|
||||
if(!(single = OCSP_resp_get0(br, i)))
|
||||
continue;
|
||||
|
||||
single = sk_OCSP_SINGLERESP_value(br->tbsResponseData->responses, i);
|
||||
|
||||
cert_status = OCSP_single_get0_status(single, &crl_reason, &rev,
|
||||
&thisupd, &nextupd);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче