Is there a way to specify curl to use a specific TLS version? Like 1.1 or 1.2? I can see only sslv3 and tlsv1 options in command help. I took latest src and compiled it with openssl 1.0.1e. Still dont see a direct option in help. Is there any other way to set it?
curl – Specifying Minor TLS Version When Using curl
curltls
Best Answer
Curl has options to control the TLS version used. At the date of the last revision to this answer, if you want to specify that TLS 1.2 is used but not 1.1 or 1.3 etc, you need something like
There have been several relevant changes in Curl since the original question was asked.
Version 7.54.0
Since version 7.54.0 the behaviour has changed, see nelsonda's answer.
Options like
--tlsv1.2
now specify a minimum version that is to be used, they no longer specify the exact version to be used.To specify an exact version to be used you likely have to also specify a value for
--tls-max
Version 7.52.0
Version 7.52.0 introduced
--tlsv1.3
in addition to the other options listed below.Version 7.34.0
Since version 7.34.0, Curl has options
--tlsv1.0
,--tlsv1.1
and--tlsv1.2
for this purpose.The manpage said