question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SSLError on HTTPie. Directly using Requests works.

See original GitHub issue

I’m getting SSL errors when connecting to some sites using HTTPie. When I manually connect to them using requests the error does not manifest itself.

$ http 'https://app.onsign.tv/accounts/login/'
http: error: SSLError: [Errno bad handshake] [('SSL routines', 'SSL23_GET_SERVER_HELLO', 'sslv3 alert handshake failure')]

$ python
Python 2.7.5 (default, Aug 25 2013, 00:04:04)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>> r = requests.get('https://app.onsign.tv/accounts/login/')
>>> r.status_code
200

$ pip freeze
Pygments==1.6
httpie==0.8.0
requests==2.2.1
wsgiref==0.1.2

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

7reactions
k0pernikuscommented, Apr 6, 2016

I was also having the error not entirely unlike this:

http: error: SSLError: [Errno bad handshake] [('SSL routines', 'SSL3_GET_SERVER_CERTIFICATE', 'certificate verify failed')]

and google led me here. In my case I just forgot that I had a self-signed certificate, so adding --verify no argument made the call work.

There may be a hidden feature request inside here, namely: Making the error message a bit more human readable.

3reactions
njbrauncommented, Dec 2, 2015

If someone runs into this, performing the following fixes it:

sudo apt-get install libffi-dev
pip install pyOpenSSL ndg-httpsclient pyasn1

https://github.com/kennethreitz/requests/issues/2022#issuecomment-143348232

Read more comments on GitHub >

github_iconTop Results From Across the Web

SSLError on HTTPie. Directly using Requests works. #204
I'm getting SSL errors when connecting to some sites using HTTPie. When I manually connect to them using requests the error does not...
Read more >
SSL: curl works, httpie fails - Super User
The error message is pretty straight-forward. It's telling you that the web server contains a SSL certificate which has some problem (most ...
Read more >
Server SSL certificate verification - HTTPie 3.2.1 (latest) docs
In a situation when piping data via stdin is not convenient (for example, when generating API docs examples), you can specify the raw...
Read more >
Python Requests throwing SSLError - Stack Overflow
The problem you are having is caused by an untrusted SSL certificate. Like @dirk mentioned in a previous comment, the quickest fix is...
Read more >
How to handle API calls to a server with self signed SSL ...
Here is another post on a scenario some of you working with telcos, banks and other ... Generating Certificate Signing Request (CSR). With...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found