New submission from Christian Heimes: The patch implements an add_cert(pem_or_der_data) method for the ssl.SSLContext() object. On success the method adds a trusted CA cert to the context's internal cert store. The CA certificate can either be an ASCII unicode string (PEM format) or buffer object (DER / ASN1 format).
The patch also implements a get_cert_count() method for debugging. I'm going to remove that function eventually as it doesn't give correct answers when the object table contains CRLs, too. A correct implementation might be useful to verify set_default_verify_paths(). I've split up the functions so I can re-use _add_cert() in my upcoming patch for an interface to crypt32.dll on Windows. ---------- components: Extension Modules files: sslctx_add_cert.patch keywords: patch messages: 190637 nosy: christian.heimes priority: normal severity: normal stage: patch review status: open title: ssl.SSLContext.add_cert() type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file30466/sslctx_add_cert.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue18138> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com