New submission from Christian Heimes: It might be useful to expose SSL_get_verify_result, https://wiki.openssl.org/index.php/Manual:SSL_get_verify_result(3) . The function returns the last verification error of 0 for no error. Application could still verify the chain with verify_mode = CERT_NONE.
>>> import socket, ssl >>> ctx = ssl.SSLContext() >>> s = ctx.wrap_socket(socket.socket()) >>> s.connect(('www.python.org', 443)) >>> s._sslobj._sslobj.get_verify_result() (20, 'unable to get local issuer certificate') ---------- assignee: christian.heimes components: SSL messages: 301526 nosy: christian.heimes priority: normal severity: normal status: open title: Add SSLSocket.get_verify_result() type: enhancement versions: Python 3.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue31372> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com