This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author giampaolo.rodola
Recipients exarkun, giampaolo.rodola, janssen, pitrou
Date 2010-08-29.10:31:43
SpamBayes Score 3.7429486e-06
Marked as misclassified No
Message-id <1283077909.09.0.00611271128967.issue9706@psf.upfronthosting.co.za>
In-reply-to
Content
>> A simple "IOError No such file or directory 'xxx'" exception would be
>> a lot more clear.
> Agreed, but the OpenSSL error reporting system looks too convoluted (or
> braindead) to easily allow such aliasing of errors. If you have an 
> idea, don't hesitate to share :)

The only idea which comes to mind is try to open() the file before calling load_cert_chain().
That would automatically also take care of permission errors, etc..
Not very clean, but... :-\

>> If possible, the error should be more clear about what happened.
>> Something like "malformed certfile was provided" or something.
> Same as above: the error message and numeric code come from OpenSSL, not
> from us.

No ideas here. I googled for some OpenSSL API to verify the certificate, which we can even possibly expose in ssl.py, but I couldn't find any. I guess we can't do nothing about this.
History
Date User Action Args
2010-08-29 10:31:49giampaolo.rodolasetrecipients: + giampaolo.rodola, exarkun, janssen, pitrou
2010-08-29 10:31:49giampaolo.rodolasetmessageid: <1283077909.09.0.00611271128967.issue9706@psf.upfronthosting.co.za>
2010-08-29 10:31:45giampaolo.rodolalinkissue9706 messages
2010-08-29 10:31:44giampaolo.rodolacreate