Imported Upstream version 7.53.1
[platform/upstream/curl.git] / docs / libcurl / opts / CURLOPT_PROXY_SSL_VERIFYHOST.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_VERIFYHOST 3 "16 Nov 2016" "libcurl 7.52.0" "curl_easy_setopt options"
24 .SH NAME
25 CURLOPT_PROXY_SSL_VERIFYHOST \- verify the proxy certificate's name against host
26 .SH SYNOPSIS
27 #include <curl/curl.h>
28
29 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SSL_VERIFYHOST, long verify);
30 .SH DESCRIPTION
31 Pass a long set to 2L as asking curl to \fIverify\fP in the HTTPS proxy's
32 certificate name fields against the proxy name.
33
34 This option determines whether libcurl verifies that the proxy cert contains
35 the correct name for the name it is known as.
36
37 When \fICURLOPT_PROXY_SSL_VERIFYHOST(3)\fP is 2, the proxy certificate must
38 indicate that the server is the proxy to which you meant to connect to, or the
39 connection fails.
40
41 Curl considers the proxy the intended one when the Common Name field or a
42 Subject Alternate Name field in the certificate matches the host name in the
43 proxy string which you told curl to use.
44
45 When the \fIverify\fP value is 1L, \fIcurl_easy_setopt\fP will return an error
46 and the option value will not be changed due to old legacy reasons.
47
48 When the \fIverify\fP value is 0L, the connection succeeds regardless of the
49 names used in the certificate. Use that ability with caution!
50
51 See also \fICURLOPT_PROXY_SSL_VERIFYPEER(3)\fP to verify the digital signature
52 of the proxy certificate.  If libcurl is built against NSS and
53 \fICURLOPT_PROXY_SSL_VERIFYPEER(3)\fP is zero,
54 \fICURLOPT_PROXY_SSL_VERIFYHOST(3)\fP is also set to zero and cannot be
55 overridden.
56 .SH DEFAULT
57 2
58 .SH PROTOCOLS
59 All protocols when used over a HTTPS proxy.
60 .SH EXAMPLE
61 .nf
62 CURL *curl = curl_easy_init();
63 if(curl) {
64   curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
65
66   /* Set the default value: strict name check please */
67   curl_easy_setopt(curl, CURLOPT_PROXY_SSL_VERIFYHOST, 2L);
68
69   curl_easy_perform(curl);
70 }
71 .fi
72 .SH AVAILABILITY
73 Added in 7.52.0.
74
75 If built TLS enabled.
76 .SH RETURN VALUE
77 Returns CURLE_OK if TLS is supported, and CURLE_UNKNOWN_OPTION if not.
78
79 If 1 is set as argument, \fICURLE_BAD_FUNCTION_ARGUMENT\fP is returned.
80 .SH "SEE ALSO"
81 .BR CURLOPT_PROXY_SSL_VERIFYPEER "(3), " CURLOPT_PROXY_CAINFO "(3), ",
82 .BR CURLOPT_SSL_VERIFYPEER "(3), " CURLOPT_CAINFO "(3), ",