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 SSL backends axTLS or 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

DEFAULT

66       CURL_SSLVERSION_DEFAULT
67

PROTOCOLS

69       All
70

EXAMPLE

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

AVAILABILITY

84       Added in 7.52.0
85

RETURN VALUE

87       Returns CURLE_OK if the option is supported,  and  CURLE_UNKNOWN_OPTION
88       if not.
89

SEE ALSO

91       CURLOPT_USE_SSL(3),  CURLOPT_HTTP_VERSION(3), CURLOPT_IPRESOLVE(3) CUR‐
92       LOPT_SSLVERSION(3),
93
94
95
96
97libcurl 7.61.1                 January 10, 2018    CURLOPT_PROXY_SSLVERSION(3)
Impressum