tls: make default TLS version be minimum 1.2

This still allows users to explictily ask for 1.0 or 1.1 as the minimum
version. If the TLS library allows it.

Starting with this change, the CURL_SSLVERSION_DEFAULT value is no
longer used as minimum version when the TLS backend are called.

This also makes curl set the minimum version to 1.2 independently of
libcurl for the rare case where a newer curl tool would use an older
libcurl.

URL: https://curl.se/mail/lib-2025-07/0007.html
Assisted-by: Stefan Eissing
Closes #17894
This commit is contained in:
Daniel Stenberg 2025-07-11 08:14:42 +02:00
parent 0e022d4241
commit 9d8998c994
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
23 changed files with 206 additions and 84 deletions

View file

@ -42,7 +42,7 @@ Use one of the available defines for this purpose. The available options are:
## CURL_SSLVERSION_DEFAULT
The default acceptable version range. The minimum acceptable version is by
default TLS v1.0 since 7.39.0 (unless the TLS library has a stricter rule).
default TLS v1.2 since 8.16.0 (unless the TLS library has a stricter rule).
## CURL_SSLVERSION_TLSv1