1--- 2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. 3SPDX-License-Identifier: curl 4Title: CURLINFO_PROXY_SSL_VERIFYRESULT 5Section: 3 6Source: libcurl 7See-also: 8 - CURLINFO_SSL_VERIFYRESULT (3) 9 - curl_easy_getinfo (3) 10 - curl_easy_setopt (3) 11Protocol: 12 - TLS 13TLS-backend: 14 - OpenSSL 15 - GnuTLS 16--- 17 18# NAME 19 20CURLINFO_PROXY_SSL_VERIFYRESULT - get the result of the proxy certificate verification 21 22# SYNOPSIS 23 24~~~c 25#include <curl/curl.h> 26 27CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_PROXY_SSL_VERIFYRESULT, 28 long *result); 29~~~ 30 31# DESCRIPTION 32 33Pass a pointer to a long to receive the result of the certificate verification 34that was requested (using the CURLOPT_PROXY_SSL_VERIFYPEER(3) 35option. This is only used for HTTPS proxies. 36 37# EXAMPLE 38 39~~~c 40int main(void) 41{ 42 CURL *curl = curl_easy_init(); 43 if(curl) { 44 CURLcode res; 45 long verifyresult; 46 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com"); 47 curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy:443"); 48 res = curl_easy_perform(curl); 49 if(res) 50 printf("error: %s\n", curl_easy_strerror(res)); 51 curl_easy_getinfo(curl, CURLINFO_PROXY_SSL_VERIFYRESULT, &verifyresult); 52 printf("The peer verification said %s\n", verifyresult? 53 "fine" : "bad"); 54 curl_easy_cleanup(curl); 55 } 56} 57~~~ 58 59# AVAILABILITY 60 61Added in 7.52.0 62 63# RETURN VALUE 64 65Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. 66