Imported Upstream version 7.53.1
[platform/upstream/curl.git] / docs / libcurl / opts / CURLOPT_PROXY_SSL_VERIFYPEER.3
1 .\" **************************************************************************
2 .\" *                                  _   _ ____  _
3 .\" *  Project                     ___| | | |  _ \| |
4 .\" *                             / __| | | | |_) | |
5 .\" *                            | (__| |_| |  _ <| |___
6 .\" *                             \___|\___/|_| \_\_____|
7 .\" *
8 .\" * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
9 .\" *
10 .\" * This software is licensed as described in the file COPYING, which
11 .\" * you should have received as part of this distribution. The terms
12 .\" * are also available at https://curl.haxx.se/docs/copyright.html.
13 .\" *
14 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
15 .\" * copies of the Software, and permit persons to whom the Software is
16 .\" * furnished to do so, under the terms of the COPYING file.
17 .\" *
18 .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 .\" * KIND, either express or implied.
20 .\" *
21 .\" **************************************************************************
22 .\"
23 .TH CURLOPT_PROXY_SSL_VERIFYPEER 3 "16 Nov 2016" "libcurl 7.52.0" "curl_easy_setopt options"
24 .SH NAME
25 CURLOPT_PROXY_SSL_VERIFYPEER \- verify the proxy's SSL certificate
26 .SH SYNOPSIS
27 #include <curl/curl.h>
28
29 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SSL_VERIFYPEER, long verify);
30 .SH DESCRIPTION
31 Pass a long as parameter set to 1L to enable or 0L to disable.
32
33 This option tells curl to verifies the authenticity of the HTTPS proxy's
34 certificate. A value of 1 means curl verifies; 0 (zero) means it doesn't.
35
36 This is the proxy version of \fICURLOPT_SSL_VERIFYPEER(3)\fP that's used for
37 ordinary HTTPS servers.
38
39 When negotiating a TLS or SSL connection, the server sends a certificate
40 indicating its identity. Curl verifies whether the certificate is authentic,
41 i.e. that you can trust that the server is who the certificate says it is.
42 This trust is based on a chain of digital signatures, rooted in certification
43 authority (CA) certificates you supply.  curl uses a default bundle of CA
44 certificates (the path for that is determined at build time) and you can
45 specify alternate certificates with the \fICURLOPT_PROXY_CAINFO(3)\fP option
46 or the \fICURLOPT_PROXY_CAPATH(3)\fP option.
47
48 When \fICURLOPT_PROXY_SSL_VERIFYPEER(3)\fP is enabled, and the verification
49 fails to prove that the certificate is authentic, the connection fails.  When
50 the option is zero, the peer certificate verification succeeds regardless.
51
52 Authenticating the certificate is not enough to be sure about the server. You
53 typically also want to ensure that the server is the server you mean to be
54 talking to.  Use \fICURLOPT_PROXY_SSL_VERIFYHOST(3)\fP for that. The check
55 that the host name in the certificate is valid for the host name you're
56 connecting to is done independently of the
57 \fICURLOPT_PROXY_SSL_VERIFYPEER(3)\fP option.
58
59 WARNING: disabling verification of the certificate allows bad guys to
60 man-in-the-middle the communication without you knowing it. Disabling
61 verification makes the communication insecure. Just having encryption on a
62 transfer is not enough as you cannot be sure that you are communicating with
63 the correct end-point.
64 .SH DEFAULT
65 1
66 .SH PROTOCOLS
67 All
68 .SH EXAMPLE
69 .nf
70 CURL *curl = curl_easy_init();
71 if(curl) {
72   curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
73
74   /* Set the default value: strict certificate check please */
75   curl_easy_setopt(curl, CURLOPT_PROXY_SSL_VERIFYPEER, 1L);
76
77   curl_easy_perform(curl);
78 }
79 .fi
80 .SH AVAILABILITY
81 Added in 7.52.0
82
83 If built TLS enabled.
84 .SH RETURN VALUE
85 Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
86 .SH "SEE ALSO"
87 .BR CURLOPT_PROXY_SSL_VERIFYHOST "(3), "
88 .BR CURLOPT_SSL_VERIFYPEER "(3), "
89 .BR CURLOPT_SSL_VERIFYHOST "(3), "