chore: bump deps
This commit is contained in:
@ -8,6 +8,12 @@ See-also:
|
||||
- CURLINFO_SSL_VERIFYRESULT (3)
|
||||
- curl_easy_getinfo (3)
|
||||
- curl_easy_setopt (3)
|
||||
Protocol:
|
||||
- TLS
|
||||
TLS-backend:
|
||||
- OpenSSL
|
||||
- GnuTLS
|
||||
Added-in: 7.52.0
|
||||
---
|
||||
|
||||
# NAME
|
||||
@ -29,9 +35,9 @@ Pass a pointer to a long to receive the result of the certificate verification
|
||||
that was requested (using the CURLOPT_PROXY_SSL_VERIFYPEER(3)
|
||||
option. This is only used for HTTPS proxies.
|
||||
|
||||
# PROTOCOLS
|
||||
0 is a positive result. Non-zero is an error.
|
||||
|
||||
All
|
||||
# %PROTOCOLS%
|
||||
|
||||
# EXAMPLE
|
||||
|
||||
@ -42,22 +48,29 @@ int main(void)
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
long verifyresult;
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy:443");
|
||||
|
||||
res = curl_easy_perform(curl);
|
||||
if(res)
|
||||
if(res) {
|
||||
printf("error: %s\n", curl_easy_strerror(res));
|
||||
curl_easy_getinfo(curl, CURLINFO_PROXY_SSL_VERIFYRESULT, &verifyresult);
|
||||
printf("The peer verification said %s\n", verifyresult?
|
||||
"fine" : "bad");
|
||||
curl_easy_cleanup(curl);
|
||||
return 1;
|
||||
}
|
||||
|
||||
res = curl_easy_getinfo(curl, CURLINFO_PROXY_SSL_VERIFYRESULT,
|
||||
&verifyresult);
|
||||
if(!res) {
|
||||
printf("The peer verification said %s\n",
|
||||
(verifyresult ? "bad" : "fine"));
|
||||
}
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
~~~
|
||||
|
||||
# AVAILABILITY
|
||||
|
||||
Added in 7.52.0
|
||||
# %AVAILABILITY%
|
||||
|
||||
# RETURN VALUE
|
||||
|
||||
|
Reference in New Issue
Block a user