I am trying to make a cURL HTTPS request to the Twitter API and I am getting this error:

[root@webscoming httpdocs]# curl -v https://api.twitter.com
About to connect() to api.twitter.com port 443 (#0)
Trying connected
Connected to api.twitter.com ( port 443 (#0)
Initializing NSS with certpath: sql:/etc/pki/nssdb
CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
NSS error -5990
Closing connection #0
SSL connect error
curl: (35) SSL connect error

I have tried this from another server and it works as expected. What does that error mean and how do I resolve it?

My server is running CentOS version 6.5.

Please note: I can correctly connect to https://encrypted.google.com but unsuccessful with https://api.twitter.com.

  • Describe your server. – Michael Hampton Jun 18 '14 at 15:56
  • Could there be some type of web proxy in place that is causing it to fail? – user247200 Oct 8 '14 at 17:55

I saw a similar kind of problem, yet not accessing twitter.
Problem I saw was on RHEL 6.1 -> RHEL 6.4, using curl to access a REST API. curl showed error: curl: (35) SSL connect error

Issue ended up being that our server running the REST API was RHEL 6.6, using a newer version of NSS. Once we upgraded the client NSS version curl was successful.

We upgraded the client from: nss-3.12.10-2.el6_1.x86_64

to: nss-3.16.1-14.el6

  • ditto. (Satellite) server had been upgraded between runs from the (RHEL 6.5) client; couldn't update anything until this was done. – Otheus Feb 1 '17 at 17:10

According to the source code that error means a time out. Your network connection to that host is most likely faulty. It might also be that Twitter filters out your IP for whatever reason.


cURL error number 35 has to do with an outdated cURL version.

To resolve this, you need to update your cURL package.

  • How update solve this issue ? **35 mean SSL connect error. The SSL handshaking failed. ** – asktyagi Jun 2 at 11:34
  • @asktyagi: What operating system are you using? CentOS? Ubuntu? What version? What's the version of your cURL library? – nyedidikeke Jun 2 at 14:48

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.