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 370 is a positive result. Non-zero is an error. 38 39# EXAMPLE 40 41~~~c 42int main(void) 43{ 44 CURL *curl = curl_easy_init(); 45 if(curl) { 46 CURLcode res; 47 long verifyresult; 48 49 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com"); 50 curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy:443"); 51 52 res = curl_easy_perform(curl); 53 if(res) { 54 printf("error: %s\n", curl_easy_strerror(res)); 55 curl_easy_cleanup(curl); 56 return 1; 57 } 58 59 res = curl_easy_getinfo(curl, CURLINFO_PROXY_SSL_VERIFYRESULT, 60 &verifyresult); 61 if(!res) { 62 printf("The peer verification said %s\n", 63 (verifyresult ? "bad" : "fine")); 64 } 65 curl_easy_cleanup(curl); 66 } 67} 68~~~ 69 70# AVAILABILITY 71 72Added in 7.52.0 73 74# RETURN VALUE 75 76Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. 77