2

When curl to an HTTPS URL and not not defined the SSL version option, which level of SSL/TLS will be used?

From the cURL documentation it says CURL_SSLVERSION_DEFAULT will use as default.

CURL_SSLVERSION_DEFAULT

The default action. This will attempt to figure out the remote SSL protocol version.

So does it depend on the other end of the connection?

  • It varies on which version of curl you're running, on which operating system (and therefore which openssl library is installed). – gowenfawr Sep 9 '15 at 15:08
4

The SSL protocol involves a handshake where the version is negotiated. The web server and the client will agree on the newest version that they both support. As cURL supports TLS 1.2, the newest standardized version, the version of TLS chosen will correspond to the highest version that the server supports unless you restrict cURL's SSL options.

Googling SSL handshake will give you many references on the version negotiation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.