Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Curl error tlsv1 alert protocol version

Tags:

curl

The following curl request returns an error. Can someone explain what is going wrong and how to correct it. I already tried to force curl to use different ssl versions (--sslv3 and --sslv2) but this did not work.

curl.exe --GET "https://www.expert.nl/" --verbose --insecure

Response:

* About to connect() to www.expert.nl port 443 (#0)
*   Trying 104.20.175.44... connected
* SSLv3, TLS handshake, Client hello (1):
* error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
* Closing connection #0
curl: (35) error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
like image 304
Nebu Avatar asked Sep 26 '17 09:09

Nebu


1 Answers

I solved this by updating the curl. (place check the curl version and openssl version, they may not match)

curl 7.12.1 need OpenSSL/0.9.7a but my OpenSSL is 1.0.2m.

details:

~ $ curl -V
curl 7.12.1 (x86_64-redhat-linux-gnu) libcurl/7.12.1 OpenSSL/0.9.7a zlib/1.2.1.2 libidn/0.5.6
Protocols: ftp gopher telnet dict ldap http file https ftps
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz
~ $ openssl version
OpenSSL 1.0.2m  2 Nov 2017
like image 192
刘远圳 Avatar answered Nov 08 '22 13:11

刘远圳