1CURLOPT_PROXY_SSL_VERIFYHOSTc(u3r)l_easy_setopt optiCoUnRsLOPT_PROXY_SSL_VERIFYHOST(3)
2
3
4
6 CURLOPT_PROXY_SSL_VERIFYHOST - verify the proxy certificate's name
7 against host
8
10 #include <curl/curl.h>
11
12 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SSL_VERIFYHOST,
13 long verify);
14
16 Pass a long set to 2L as asking curl to verify in the HTTPS proxy's
17 certificate name fields against the proxy name.
18
19 This option determines whether libcurl verifies that the proxy cert
20 contains the correct name for the name it is known as.
21
22 When CURLOPT_PROXY_SSL_VERIFYHOST(3) is 2, the proxy certificate must
23 indicate that the server is the proxy to which you meant to connect to,
24 or the connection fails.
25
26 Curl considers the proxy the intended one when the Common Name field or
27 a Subject Alternate Name field in the certificate matches the host name
28 in the proxy string which you told curl to use.
29
30 If verify value is set to 1:
31
32 In 7.28.0 and earlier: treated as a debug option of some sorts, not
33 supported anymore due to frequently leading to programmer mistakes.
34
35 From 7.28.1 to 7.65.3: setting it to 1 made curl_easy_setopt() return
36 an error and leaving the flag untouched.
37
38 From 7.66.0: treats 1 and 2 the same.
39
40 When the verify value is 0L, the connection succeeds regardless of the
41 names used in the certificate. Use that ability with caution!
42
43 See also CURLOPT_PROXY_SSL_VERIFYPEER(3) to verify the digital signa‐
44 ture of the proxy certificate. If libcurl is built against NSS and
45 CURLOPT_PROXY_SSL_VERIFYPEER(3) is zero, CURLOPT_PROXY_SSL_VERIFY‐
46 HOST(3) is also set to zero and cannot be overridden.
47
49 2
50
52 All protocols when used over an HTTPS proxy.
53
55 CURL *curl = curl_easy_init();
56 if(curl) {
57 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
58
59 /* Set the default value: strict name check please */
60 curl_easy_setopt(curl, CURLOPT_PROXY_SSL_VERIFYHOST, 2L);
61
62 curl_easy_perform(curl);
63 }
64
66 Added in 7.52.0.
67
68 If built TLS enabled.
69
71 Returns CURLE_OK if TLS is supported, and CURLE_UNKNOWN_OPTION if not.
72
73 If 1 is set as argument, CURLE_BAD_FUNCTION_ARGUMENT is returned.
74
76 CURLOPT_PROXY_SSL_VERIFYPEER(3), CURLOPT_PROXY_CAINFO(3), CUR‐
77 LOPT_SSL_VERIFYPEER(3), CURLOPT_CAINFO(3),
78
79
80
81libcurl 7.66.0 August 20, 2019CURLOPT_PROXY_SSL_VERIFYHOST(3)