Re: [Python-Dev] Proposal for better SSL errors

2012-05-27 Thread Cameron Simpson
On 27May2012 11:29, Antoine Pitrou wrote: | On Sun, 27 May 2012 12:00:57 +1000 | Cameron Simpson wrote: | > On 26May2012 21:28, Antoine Pitrou wrote: | > | You'll note there is still a "Errno 5" in that error message; I don't | > | really know what to do with it. Hard-wiring the errno attribute

Re: [Python-Dev] Proposal for better SSL errors

2012-05-27 Thread Antoine Pitrou
On Sun, 27 May 2012 12:00:57 +1000 Cameron Simpson wrote: > On 26May2012 21:28, Antoine Pitrou wrote: > | Not only does the error string contain more valuable information (the > | mnemonics "SSL" and "CERTIFICATE_VERIFY_FAILED" indicate, respectively, > | in which subpart of OpenSSL and which pre

Re: [Python-Dev] Proposal for better SSL errors

2012-05-27 Thread Antoine Pitrou
On Sat, 26 May 2012 19:31:55 -0700 "Gregory P. Smith" wrote: > > There is a long term caveat to the overall approach: It still leaves the > exception details being OpenSSL specific. If someone wants to ditch > OpenSSL and use something else such as NSS (for example) in a future _ssl > implementa

Re: [Python-Dev] Proposal for better SSL errors

2012-05-26 Thread Gregory P. Smith
On Sat, May 26, 2012 at 12:28 PM, Antoine Pitrou wrote: > > Hello, > > In http://bugs.python.org/issue14837 I have attached a proof-of-concept > patch to improve the exceptions raised by the ssl module when OpenSSL > signals an error. The current situation is quite dismal, since you get > a someti

Re: [Python-Dev] Proposal for better SSL errors

2012-05-26 Thread Cameron Simpson
On 26May2012 21:28, Antoine Pitrou wrote: | Not only does the error string contain more valuable information (the | mnemonics "SSL" and "CERTIFICATE_VERIFY_FAILED" indicate, respectively, | in which subpart of OpenSSL and which precise error occurred), but they | are also introspectable: | | >>>

Re: [Python-Dev] Proposal for better SSL errors

2012-05-26 Thread Antoine Pitrou
On Sat, 26 May 2012 17:44:08 -0400 Terry Reedy wrote: > > Traceback (most recent call last): > > [...] > > ssl.SSLError: [Errno 5] [SSL: CERTIFICATE_VERIFY_FAILED] certificate > > verify failed (_ssl.c:494) [88296 refs] > > Repeating the same reason in upper and lower case is unhelpful noise. >

Re: [Python-Dev] Proposal for better SSL errors

2012-05-26 Thread Terry Reedy
On 5/26/2012 3:28 PM, Antoine Pitrou wrote: Hello, In http://bugs.python.org/issue14837 I have attached a proof-of-concept patch to improve the exceptions raised by the ssl module when OpenSSL signals an error. The current situation is quite dismal, since you get a sometimes cryptic error messa