Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Problem setting option CURLOPT_SSLVERSION to a range #2225
I am trying to use curl_easy_setopt to specify TLS 1.1 or higher. If I do the following (from the documentation):
I always get CURLE_BAD_FUNCTION_ARGUMENT. Even if I try any of the other max values.
Looking at setopt, I see the validation is using:
The problem with that is, the max values are shifted 16bits, so they are always greater than CURL_SSLVERSION_TLSv1_3.
curl 7.57.0 (i386-pc-win32) libcurl/7.57.0 OpenSSL/1.0.2n WinIDN
Windows 10 Pro x64 version 1709
I've submitted #2227 to address the issue you reported. Can you test it please?
The way those MAX values are used needs to be better documented to explain that only one MAX and one regular value can be OR'd together (if I understand it right). Otherwise in my opinion it can lead to user error.