1CURLOPT_PROXY_SSLVERSION(3)curl_easy_setopt optionsCURLOPT_PROXY_SSLVERSION(3)
2
3
4

NAME

6       CURLOPT_PROXY_SSLVERSION - set preferred proxy TLS/SSL version
7

SYNOPSIS

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

DESCRIPTION

15       Pass a long as parameter to control which version of SSL/TLS to attempt
16       to use when connecting to an HTTPS proxy.
17
18       Use  one  of  the  available  defines  for  this purpose. The available
19       options are:
20
21              CURL_SSLVERSION_DEFAULT
22                     The default action. This will attempt to figure  out  the
23                     remote SSL protocol version.
24
25              CURL_SSLVERSION_TLSv1
26                     TLSv1.x
27
28              CURL_SSLVERSION_TLSv1_0
29                     TLSv1.0
30
31              CURL_SSLVERSION_TLSv1_1
32                     TLSv1.1
33
34              CURL_SSLVERSION_TLSv1_2
35                     TLSv1.2
36
37              CURL_SSLVERSION_TLSv1_3
38                     TLSv1.3
39       The  maximum  TLS  version  can be set by using one of the CURL_SSLVER‐
40       SION_MAX_  macros  below.  It  is  also  possible  to  OR  one  of  the
41       CURL_SSLVERSION_  macros  with  one of the CURL_SSLVERSION_MAX_ macros.
42       The MAX macros are not supported for WolfSSL.
43
44              CURL_SSLVERSION_MAX_DEFAULT
45                     The flag defines the maximum  supported  TLS  version  as
46                     TLSv1.2,  or  the  default  value  from  the SSL library.
47                     (Added in 7.54.0)
48
49              CURL_SSLVERSION_MAX_TLSv1_0
50                     The  flag  defines  maximum  supported  TLS  version   as
51                     TLSv1.0.  (Added in 7.54.0)
52
53              CURL_SSLVERSION_MAX_TLSv1_1
54                     The   flag  defines  maximum  supported  TLS  version  as
55                     TLSv1.1.  (Added in 7.54.0)
56
57              CURL_SSLVERSION_MAX_TLSv1_2
58                     The  flag  defines  maximum  supported  TLS  version   as
59                     TLSv1.2.  (Added in 7.54.0)
60
61              CURL_SSLVERSION_MAX_TLSv1_3
62                     The   flag  defines  maximum  supported  TLS  version  as
63                     TLSv1.3.  (Added in 7.54.0)
64
65       In versions of curl prior to 7.54 the CURL_SSLVERSION_TLS options  were
66       documented  to  allow  only the specified TLS version, but behavior was
67       inconsistent depending on the TLS library.
68
69

DEFAULT

71       CURL_SSLVERSION_DEFAULT
72

PROTOCOLS

74       All
75

EXAMPLE

77       CURL *curl = curl_easy_init();
78       if(curl) {
79         curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
80
81         /* ask libcurl to use TLS version 1.0 or later */
82         curl_easy_setopt(curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1);
83
84         /* Perform the request */
85         curl_easy_perform(curl);
86       }
87

AVAILABILITY

89       Added in 7.52.0
90

RETURN VALUE

92       Returns CURLE_OK if the option is supported,  and  CURLE_UNKNOWN_OPTION
93       if not.
94

SEE ALSO

96       CURLOPT_USE_SSL(3),  CURLOPT_HTTP_VERSION(3), CURLOPT_IPRESOLVE(3) CUR‐
97       LOPT_SSLVERSION(3),
98
99
100
101libcurl 7.69.1                 October 31, 2019    CURLOPT_PROXY_SSLVERSION(3)
Impressum