]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-18233: Add internal methods to access peer chain (GH-25467)
authorChristian Heimes <christian@python.org>
Mon, 26 Apr 2021 13:01:40 +0000 (15:01 +0200)
committerGitHub <noreply@github.com>
Mon, 26 Apr 2021 13:01:40 +0000 (15:01 +0200)
commit666991fc598bc312d72aff0078ecb553f0a968f1
tree7fa615cd3d075120eb98cf4cea879a753c06e33f
parent3c586ca500854476e6eff06713236faff233d035
bpo-18233: Add internal methods to access peer chain (GH-25467)

The internal `_ssl._SSLSocket` object now provides methods to retrieve
the peer cert chain and verified cert chain as a list of Certificate
objects. Certificate objects have methods to convert the cert to a dict,
PEM, or DER (ASN.1).

These are private APIs for now. There is a slim chance to stabilize the
approach and provide a public API for 3.10. Otherwise I'll provide a
stable API in 3.11.

Signed-off-by: Christian Heimes <christian@python.org>
Lib/test/test_ssl.py
Misc/NEWS.d/next/Library/2020-11-19-09-52-24.bpo-18369.qzvYH2.rst [new file with mode: 0644]
Modules/_ssl.c
Modules/_ssl.h
Modules/_ssl/cert.c [new file with mode: 0644]
Modules/_ssl/clinic/cert.c.h [new file with mode: 0644]
Modules/_ssl/misc.c [new file with mode: 0644]
Modules/clinic/_ssl.c.h
setup.py