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
16Added-in: 7.52.0
17---
18
19# NAME
20
21CURLINFO_PROXY_SSL_VERIFYRESULT - get the result of the proxy certificate verification
22
23# SYNOPSIS
24
25~~~c
26#include <curl/curl.h>
27
28CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_PROXY_SSL_VERIFYRESULT,
29                           long *result);
30~~~
31
32# DESCRIPTION
33
34Pass a pointer to a long to receive the result of the certificate verification
35that was requested (using the CURLOPT_PROXY_SSL_VERIFYPEER(3)
36option. This is only used for HTTPS proxies.
37
380 is a positive result. Non-zero is an error.
39
40# %PROTOCOLS%
41
42# EXAMPLE
43
44~~~c
45int main(void)
46{
47  CURL *curl = curl_easy_init();
48  if(curl) {
49    CURLcode res;
50    long verifyresult;
51
52    curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
53    curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy:443");
54
55    res = curl_easy_perform(curl);
56    if(res) {
57      printf("error: %s\n", curl_easy_strerror(res));
58      curl_easy_cleanup(curl);
59      return 1;
60    }
61
62    res = curl_easy_getinfo(curl, CURLINFO_PROXY_SSL_VERIFYRESULT,
63                            &verifyresult);
64    if(!res) {
65      printf("The peer verification said %s\n",
66             (verifyresult ? "bad" : "fine"));
67    }
68    curl_easy_cleanup(curl);
69  }
70}
71~~~
72
73# %AVAILABILITY%
74
75# RETURN VALUE
76
77Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
78