1CURLOPT_PROXY_SSL_VERIFYPEERc(u3r)l_easy_setopt optiCoUnRsLOPT_PROXY_SSL_VERIFYPEER(3)
2
3
4

NAME

6       CURLOPT_PROXY_SSL_VERIFYPEER - verify the proxy's SSL certificate
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode  curl_easy_setopt(CURL  *handle, CURLOPT_PROXY_SSL_VERIFYPEER,
12       long verify);
13

DESCRIPTION

15       Pass a long as parameter set to 1L to enable or 0L to disable.
16
17       This option tells curl  to  verifies  the  authenticity  of  the  HTTPS
18       proxy's  certificate.  A value of 1 means curl verifies; 0 (zero) means
19       it doesn't.
20
21       This is the proxy version of CURLOPT_SSL_VERIFYPEER(3) that's used  for
22       ordinary HTTPS servers.
23
24       When  negotiating  a TLS or SSL connection, the server sends a certifi‐
25       cate indicating its identity. Curl verifies whether the certificate  is
26       authentic,  i.e. that you can trust that the server is who the certifi‐
27       cate says it is.  This trust is based on a chain of digital signatures,
28       rooted  in  certification authority (CA) certificates you supply.  curl
29       uses a default bundle of CA certificates (the path for that  is  deter‐
30       mined  at  build  time) and you can specify alternate certificates with
31       the  CURLOPT_PROXY_CAINFO(3)  option  or  the   CURLOPT_PROXY_CAPATH(3)
32       option.
33
34       When  CURLOPT_PROXY_SSL_VERIFYPEER(3)  is enabled, and the verification
35       fails to prove that the certificate is authentic, the connection fails.
36       When  the  option  is  zero, the peer certificate verification succeeds
37       regardless.
38
39       Authenticating the certificate is not  enough  to  be  sure  about  the
40       server. You typically also want to ensure that the server is the server
41       you mean to be talking  to.   Use  CURLOPT_PROXY_SSL_VERIFYHOST(3)  for
42       that.  The check that the host name in the certificate is valid for the
43       host name you're connecting  to  is  done  independently  of  the  CUR‐
44       LOPT_PROXY_SSL_VERIFYPEER(3) option.
45
46       WARNING:  disabling  verification of the certificate allows bad guys to
47       man-in-the-middle the communication without you knowing  it.  Disabling
48       verification  makes  the communication insecure. Just having encryption
49       on a transfer is not enough as you cannot be sure that you are communi‐
50       cating with the correct end-point.
51

DEFAULT

53       1
54

PROTOCOLS

56       All
57

EXAMPLE

59       CURL *curl = curl_easy_init();
60       if(curl) {
61         curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
62
63         /* Set the default value: strict certificate check please */
64         curl_easy_setopt(curl, CURLOPT_PROXY_SSL_VERIFYPEER, 1L);
65
66         curl_easy_perform(curl);
67       }
68

AVAILABILITY

70       Added in 7.52.0
71
72       If built TLS enabled.
73

RETURN VALUE

75       Returns  CURLE_OK  if the option is supported, and CURLE_UNKNOWN_OPTION
76       if not.
77

SEE ALSO

79       CURLOPT_PROXY_SSL_VERIFYHOST(3),    CURLOPT_SSL_VERIFYPEER(3),     CUR‐
80       LOPT_SSL_VERIFYHOST(3),
81
82
83
84libcurl 7.71.1                 December 16, 2016CURLOPT_PROXY_SSL_VERIFYPEER(3)
Impressum