| 1 |
.\" ************************************************************************** |
| 2 |
.\" * _ _ ____ _ |
| 3 |
.\" * Project ___| | | | _ \| | |
| 4 |
.\" * / __| | | | |_) | | |
| 5 |
.\" * | (__| |_| | _ <| |___ |
| 6 |
.\" * \___|\___/|_| \_\_____| |
| 7 |
.\" * |
| 8 |
.\" * Copyright (C) 1998 - 2019, 2018, Daniel Stenberg, <[email protected]>, 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_SSLVERSION 3 "16 Nov 2016" "libcurl 7.52.0" "curl_easy_setopt options" |
| 24 |
.SH NAME |
| 25 |
CURLOPT_PROXY_SSLVERSION \- set preferred proxy TLS/SSL version |
| 26 |
.SH SYNOPSIS |
| 27 |
#include <curl/curl.h> |
| 28 |
|
| 29 |
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SSLVERSION, long version); |
| 30 |
.SH DESCRIPTION |
| 31 |
Pass a long as parameter to control which version of SSL/TLS to attempt to use |
| 32 |
when connecting to an HTTPS proxy. |
| 33 |
|
| 34 |
Use one of the available defines for this purpose. The available options are: |
| 35 |
.RS |
| 36 |
.IP CURL_SSLVERSION_DEFAULT |
| 37 |
The default action. This will attempt to figure out the remote SSL protocol |
| 38 |
version. |
| 39 |
.IP CURL_SSLVERSION_TLSv1 |
| 40 |
TLSv1.x |
| 41 |
.IP CURL_SSLVERSION_TLSv1_0 |
| 42 |
TLSv1.0 |
| 43 |
.IP CURL_SSLVERSION_TLSv1_1 |
| 44 |
TLSv1.1 |
| 45 |
.IP CURL_SSLVERSION_TLSv1_2 |
| 46 |
TLSv1.2 |
| 47 |
.IP CURL_SSLVERSION_TLSv1_3 |
| 48 |
TLSv1.3 |
| 49 |
.RE |
| 50 |
The maximum TLS version can be set by using \fIone\fP of the |
| 51 |
CURL_SSLVERSION_MAX_ macros below. It is also possible to OR \fIone\fP of the |
| 52 |
CURL_SSLVERSION_ macros with \fIone\fP of the CURL_SSLVERSION_MAX_ macros. |
| 53 |
The MAX macros are not supported for WolfSSL. |
| 54 |
.RS |
| 55 |
.IP CURL_SSLVERSION_MAX_DEFAULT |
| 56 |
The flag defines the maximum supported TLS version as TLSv1.2, or the default |
| 57 |
value from the SSL library. |
| 58 |
(Added in 7.54.0) |
| 59 |
.IP CURL_SSLVERSION_MAX_TLSv1_0 |
| 60 |
The flag defines maximum supported TLS version as TLSv1.0. |
| 61 |
(Added in 7.54.0) |
| 62 |
.IP CURL_SSLVERSION_MAX_TLSv1_1 |
| 63 |
The flag defines maximum supported TLS version as TLSv1.1. |
| 64 |
(Added in 7.54.0) |
| 65 |
.IP CURL_SSLVERSION_MAX_TLSv1_2 |
| 66 |
The flag defines maximum supported TLS version as TLSv1.2. |
| 67 |
(Added in 7.54.0) |
| 68 |
.IP CURL_SSLVERSION_MAX_TLSv1_3 |
| 69 |
The flag defines maximum supported TLS version as TLSv1.3. |
| 70 |
(Added in 7.54.0) |
| 71 |
.RE |
| 72 |
|
| 73 |
In versions of curl prior to 7.54 the CURL_SSLVERSION_TLS options were |
| 74 |
documented to allow \fIonly\fP the specified TLS version, but behavior was |
| 75 |
inconsistent depending on the TLS library. |
| 76 |
|
| 77 |
.SH DEFAULT |
| 78 |
CURL_SSLVERSION_DEFAULT |
| 79 |
.SH PROTOCOLS |
| 80 |
All |
| 81 |
.SH EXAMPLE |
| 82 |
.nf |
| 83 |
CURL *curl = curl_easy_init(); |
| 84 |
if(curl) { |
| 85 |
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com"); |
| 86 |
|
| 87 |
/* ask libcurl to use TLS version 1.0 or later */ |
| 88 |
curl_easy_setopt(curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1); |
| 89 |
|
| 90 |
/* Perform the request */ |
| 91 |
curl_easy_perform(curl); |
| 92 |
} |
| 93 |
.fi |
| 94 |
.SH AVAILABILITY |
| 95 |
Added in 7.52.0 |
| 96 |
.SH RETURN VALUE |
| 97 |
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. |
| 98 |
.SH "SEE ALSO" |
| 99 |
.BR CURLOPT_USE_SSL "(3), " CURLOPT_HTTP_VERSION "(3), " |
| 100 |
.BR CURLOPT_IPRESOLVE "(3) " CURLOPT_SSLVERSION "(3), " |