Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

curl error 35 : unknown SSL protocol error in connection

$ curl -I https://9.185.173.135
curl: (35) Unknown SSL protocol error in connection to 9.185.173.135:443

This is an secured page that I need to access. But I don't know how to obtain its certificate file. I tried to use Firefox, but it says couldn't get any ssl certificate once the url is entered.

$ curl -I http://9.185.173.135
HTTP/1.1 200 OK
Content-Length: 686
Content-Type: text/html
Content-Location: http://9.185.173.135/Default.htm
Last-Modified: Mon, 16 Mar 2009 05:05:38 GMT
Accept-Ranges: bytes
ETag: "a851dbd8f4a5c91:d41"
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Date: Tue, 13 Jul 2010 04:09:35 GMT

The server is definitely reachable from my laptop. Once I get the certificate file, I assume I can then import it to Firefox and then use my credentials to pass the authentication (I already got the username/password).

Sorry I am no expert in security at all. Is there anything else I can try?

Many thanks in advance.

like image 776
Michael Mao Avatar asked Jul 13 '10 04:07

Michael Mao


People also ask

Could not initiate SSL tls connection error 140770FC SSL routines SSL23_ get_ server_ hello unknown protocol?

If you see an error like this: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol , it could be due to you typing the hostname incorrectly or the hostname is not yet tabled in your DNS. You can verify that with a simple "host" or "nslookup".


1 Answers

In my case on a AIX VM also this problem, use --cacert to specific a cacert.pem

curl --cacert /var/ssl/cacert.pem https://localhost:3000

like image 100
Peter Shen Avatar answered Oct 02 '22 23:10

Peter Shen