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.

Make debugging TLS errors easier for users

See original GitHub issue

Something like this: ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Hostname mismatch, certificate is not valid for 'momoshop.com.tw'. (_ssl.c:1108) is not user friendly. If we can somehow wrap and reraise common errors with links to documentation and a slightly more helpful message would be easier for users and keep people from turning off TLS verification.

What are everyone’s thoughts on this? It’s definitely a moving target and more work on our side.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
sethmlarsoncommented, Aug 21, 2019

It’d be great to capture some of the common scenarios that people run into when using an HTTP library:

  • Unsupported TLS version / no cipher overlap.
  • Self-signed certificate
  • Certificate expired
  • Certificate doesn’t have subjectAltName but does have commonName
  • Certificate subjectAltName and hostname don’t match.
  • Certificate isn’t in their trust store.

give the user a brief message about what happened and then point them our docs via URL. At the URL we give a lot more detail, it could honestly just be a FAQ section of our docs that has a bunch of sub-topics of common pitfalls / errors that we can hand the user. (Cuz this could be applicable to other things too like DNS, ConnectionErrors, ProtocolErrors, etc even if we just tell a user to turn on debugging and create an issue if they can’t figure it out)

Things that get people to not disable TLS or hostname verification are good, because in my experience when people hit a TLS error that they don’t understand they turn off verification because at the end of the day they’re just trying to make an HTTP request.

0reactions
florimondmancacommented, Mar 13, 2020

So, given the recent improvements to our exception handling, and that making dealing with SSL errors more user-friendly is a task that’s pretty general to Python as a whole, so anything might as well come from a third-party package, I’m going to close this off for housekeeping purposes… But I’d still agree it’d be a really nice-to-have UX-wise. Just don’t see any particular action item at this point now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SSL/TLS - Typical problems and how to debug them
This guide tries to help with debugging of SSL/TLS problems and shows the most common problems in interaction between client and server.
Read more >
SSL/TLS connection issue troubleshooting test tools
This blog introduces SSL/TLS connection troubleshooting tools, including curl, openssl, ssllab, web browser, and certutil.
Read more >
How to debug TLS/SSL Web errors? · Issue #6453 - GitHub
Low-hanging fruit first: Double check that you're specifying the correct port for the connection in the URL. Not likely this is an issue, ......
Read more >
Debugging TLS connections | IBM Security Verify
I am struggling debugging a SSL connection.Here is what I have:ISAM is the client, and LDAP is the server (using LDAPS)If I configure...
Read more >
Debug possible SSL/TLS problem? - Unix Stack Exchange
I'll blindy assume that fetching dependencies would take place over http. You could use openssl's built-in command line tool to connect ...
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