diff options
author | Alessandro Ghedini <alessandro@ghedini.me> | 2015-03-20 13:24:08 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2015-03-20 15:36:05 +0100 |
commit | 8854f8d45a5cef688377c29e49e8d8b2bd668ee4 (patch) | |
tree | e8b6723ba333069249b6048db1480b07544bd84e /lib/vtls | |
parent | 9e8f9dbdd3cde8076ec83c89c36a62ad98adbcbb (diff) |
openssl: try to avoid accessing OCSP structs when possible
Diffstat (limited to 'lib/vtls')
-rw-r--r-- | lib/vtls/openssl.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c index f0c97f044..3f93e220b 100644 --- a/lib/vtls/openssl.c +++ b/lib/vtls/openssl.c @@ -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); |