[issue28182] Expose OpenSSL verification results in SSLError

Christian Heimes report at bugs.python.org
Fri Sep 8 15:03:23 EDT 2017


Christian Heimes added the comment:

The ssl module now reports cause of validation failure:

>>> import ssl
>>> import ssl, socket
>>> ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
>>> sock = ctx.wrap_socket(socket.socket(), server_hostname='www.python.org')
>>> sock.connect(('www.python.org', 443))
Traceback (most recent call last):
...
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:825)

----------
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue28182>
_______________________________________


More information about the Python-bugs-list mailing list