4

When I try to Curl a SSL page on my ubuntu 12.04 TLS server, it won't work:

not ssl page:

$ curl https://evernote.com/ -vv
[the entire webpage]

ssl page:

$ curl https://evernote.com/ -vv
* About to connect() to evernote.com port 443 (#0)
*   Trying 204.154.94.73... connected
* successfully set certificate verify locations:
*   CAfile: none
  CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* Unknown SSL protocol error in connection to evernote.com:443 
* Closing connection #0
curl: (35) Unknown SSL protocol error in connection to evernote.com:443 

This does work on my own machine (OS X).

When I try it via openSSL:

$ openssl s_client -connect evernote.com:433
connect: Connection timed out
connect:errno=110

openSSL version:

$ openssl version
OpenSSL 1.0.1c 10 May 2012
2
  • If you are using cloud services.. then makes sense to check (with your cloud provider) if theres any proxy in between that could be dropping your connection
    – user348031
    Apr 8, 2016 at 16:14
  • Another advice: check local time is correct. Jul 24, 2023 at 16:21

2 Answers 2

6

You seem to have a typo.

$ openssl s_client -connect evernote.com:433

Port 433 is not open on the remote host, which is why you got error 110 (Connection refused).

Try using port 443 (the standard HTTPS port) instead.


As for curl, I can replicate the problem when using evernote.com, but www.evernote.com works properly (though it sends a 302 redirect to https://evernote.com/.

$ curl https://evernote.com/ -vv
* About to connect() to evernote.com port 443 (#0)
*   Trying 204.154.94.73...
* connected
* Connected to evernote.com (204.154.94.73) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* NSS error -5938 (PR_END_OF_FILE_ERROR)
* Encountered end of file
* Closing connection #0
curl: (35) Encountered end of file

This means that the server killed the connection. For whatever reason it really doesn't want to talk to us.

This is probably not something that you can fix.

3
  • The openssl command had a typo indeed. But my curl command gives a different error: curl: (35) Unknown SSL protocol error in connection to evernote.com:443 . The error disappears on google.com so I guess it's the server.
    – askmike
    Sep 12, 2012 at 14:08
  • The errors seen here (with PR_END_OF_FILE_ERROR) are likely realted to stackoverflow.com/questions/15773806/…
    – Eric Rich
    Jul 26, 2016 at 15:29
  • 1
    @EricRich There's no obvious relation between this and the post you linked. Please clarify. Jul 26, 2016 at 15:58
1

Had very similar problem - there was an issue in protocol negotiation, which probably led to some miscommunication with the crypto provider (OpenSSL libs). Try setting the secure protocol explicitly, e.g.:

curl --sslv3 # OR
curl --sslv2 # OR
curl --tlsv1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .