1CURLOPT_PROXY_SSL_VERIFYHOSTc(u3r)l_easy_setopt optiCoUnRsLOPT_PROXY_SSL_VERIFYHOST(3)
2
3
4

NAME

6       CURLOPT_PROXY_SSL_VERIFYHOST  -  verify  the  proxy  certificate's name
7       against host
8

SYNOPSIS

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

DESCRIPTION

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       When  the verify value is 1L, curl_easy_setopt will return an error and
31       the option value will not be changed due to old legacy reasons.
32
33       When the verify value is 0L, the connection succeeds regardless of  the
34       names used in the certificate. Use that ability with caution!
35
36       See  also  CURLOPT_PROXY_SSL_VERIFYPEER(3) to verify the digital signa‐
37       ture of the proxy certificate.  If libcurl is  built  against  NSS  and
38       CURLOPT_PROXY_SSL_VERIFYPEER(3)   is   zero,  CURLOPT_PROXY_SSL_VERIFY‐
39       HOST(3) is also set to zero and cannot be overridden.
40

DEFAULT

42       2
43

PROTOCOLS

45       All protocols when used over an HTTPS proxy.
46

EXAMPLE

48       CURL *curl = curl_easy_init();
49       if(curl) {
50         curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
51
52         /* Set the default value: strict name check please */
53         curl_easy_setopt(curl, CURLOPT_PROXY_SSL_VERIFYHOST, 2L);
54
55         curl_easy_perform(curl);
56       }
57

AVAILABILITY

59       Added in 7.52.0.
60
61       If built TLS enabled.
62

RETURN VALUE

64       Returns CURLE_OK if TLS is supported, and CURLE_UNKNOWN_OPTION if not.
65
66       If 1 is set as argument, CURLE_BAD_FUNCTION_ARGUMENT is returned.
67

SEE ALSO

69       CURLOPT_PROXY_SSL_VERIFYPEER(3),     CURLOPT_PROXY_CAINFO(3),      CUR‐
70       LOPT_SSL_VERIFYPEER(3), CURLOPT_CAINFO(3),
71
72
73
74libcurl 7.64.0                   May 02, 2018  CURLOPT_PROXY_SSL_VERIFYHOST(3)
Impressum