comparison mupdf-source/thirdparty/curl/docs/libcurl/opts/CURLOPT_SSLVERSION.3 @ 2:b50eed0cc0ef upstream

ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4. The directory name has changed: no version number in the expanded directory now.
author Franz Glasner <fzglas.hg@dom66.de>
date Mon, 15 Sep 2025 11:43:07 +0200
parents
children
comparison
equal deleted inserted replaced
1:1d09e1dec1d9 2:b50eed0cc0ef
1 .\" **************************************************************************
2 .\" * _ _ ____ _
3 .\" * Project ___| | | | _ \| |
4 .\" * / __| | | | |_) | |
5 .\" * | (__| |_| | _ <| |___
6 .\" * \___|\___/|_| \_\_____|
7 .\" *
8 .\" * Copyright (C) 1998 - 2015, 2018, Daniel Stenberg, <daniel@haxx.se>, 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_SSLVERSION 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
24 .SH NAME
25 CURLOPT_SSLVERSION \- set preferred TLS/SSL version
26 .SH SYNOPSIS
27 #include <curl/curl.h>
28
29 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSLVERSION, long version);
30 .SH DESCRIPTION
31 Pass a long as parameter to control which version range of SSL/TLS versions to
32 use.
33
34 The SSL and TLS versions have typically developed from the most insecure
35 version to be more and more secure in this order through history: SSL v2,
36 SSLv3, TLS v1.0, TLS v1.1, TLS v1.2 and the most recent TLS v1.3.
37
38 Use one of the available defines for this purpose. The available options are:
39 .RS
40 .IP CURL_SSLVERSION_DEFAULT
41 The default acceptable version range. The minimum acceptable version is by
42 default TLS v1.0 since 7.39.0 (unless the TLS library has a stricter rule).
43 .IP CURL_SSLVERSION_TLSv1
44 TLS v1.0 or later
45 .IP CURL_SSLVERSION_SSLv2
46 SSL v2 (but not SSLv3)
47 .IP CURL_SSLVERSION_SSLv3
48 SSL v3 (but not SSLv2)
49 .IP CURL_SSLVERSION_TLSv1_0
50 TLS v1.0 or later (Added in 7.34.0)
51 .IP CURL_SSLVERSION_TLSv1_1
52 TLS v1.1 or later (Added in 7.34.0)
53 .IP CURL_SSLVERSION_TLSv1_2
54 TLS v1.2 or later (Added in 7.34.0)
55 .IP CURL_SSLVERSION_TLSv1_3
56 TLS v1.3 or later (Added in 7.52.0)
57 .RE
58
59 The maximum TLS version can be set by using \fIone\fP of the
60 CURL_SSLVERSION_MAX_ macros below. It is also possible to OR \fIone\fP of the
61 CURL_SSLVERSION_ macros with \fIone\fP of the CURL_SSLVERSION_MAX_ macros.
62 The MAX macros are not supported for WolfSSL.
63 .RS
64 .IP CURL_SSLVERSION_MAX_DEFAULT
65 The flag defines the maximum supported TLS version by libcurl, or the default
66 value from the SSL library is used. libcurl will use a sensible default
67 maximum, which was TLS v1.2 up to before 7.61.0 and is TLS v1.3 since then -
68 assuming the TLS library support it. (Added in 7.54.0)
69 .IP CURL_SSLVERSION_MAX_TLSv1_0
70 The flag defines maximum supported TLS version as TLS v1.0.
71 (Added in 7.54.0)
72 .IP CURL_SSLVERSION_MAX_TLSv1_1
73 The flag defines maximum supported TLS version as TLS v1.1.
74 (Added in 7.54.0)
75 .IP CURL_SSLVERSION_MAX_TLSv1_2
76 The flag defines maximum supported TLS version as TLS v1.2.
77 (Added in 7.54.0)
78 .IP CURL_SSLVERSION_MAX_TLSv1_3
79 The flag defines maximum supported TLS version as TLS v1.3.
80 (Added in 7.54.0)
81 .RE
82
83 In versions of curl prior to 7.54 the CURL_SSLVERSION_TLS options were
84 documented to allow \fIonly\fP the specified TLS version, but behavior was
85 inconsistent depending on the TLS library.
86
87 .SH DEFAULT
88 CURL_SSLVERSION_DEFAULT
89 .SH PROTOCOLS
90 All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.
91 .SH EXAMPLE
92 .nf
93 CURL *curl = curl_easy_init();
94 if(curl) {
95 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
96
97 /* ask libcurl to use TLS version 1.0 or later */
98 curl_easy_setopt(curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1);
99
100 /* Perform the request */
101 curl_easy_perform(curl);
102 }
103 .fi
104 .SH AVAILABILITY
105 SSLv2 is disabled by default since 7.18.1. Other SSL versions availability may
106 vary depending on which backend libcurl has been built to use.
107
108 SSLv3 is disabled by default since 7.39.0.
109 .SH RETURN VALUE
110 Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
111 .SH "SEE ALSO"
112 .BR CURLOPT_USE_SSL "(3), " CURLOPT_HTTP_VERSION "(3), "
113 .BR CURLOPT_PROXY_SSLVERSION "(3), " CURLOPT_IPRESOLVE "(3) "