Make debugging TLS errors easier for users
See original GitHub issueSomething 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:
- Created 4 years ago
- Comments:5 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’d be great to capture some of the common scenarios that people run into when using an HTTP library:
subjectAltName
but does havecommonName
subjectAltName
and hostname don’t match.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.
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.