mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
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>
This commit is contained in:
parent
3c586ca500
commit
666991fc59
9 changed files with 563 additions and 6 deletions
8
setup.py
8
setup.py
|
@ -2472,7 +2472,13 @@ class PyBuildExt(build_ext):
|
|||
Extension(
|
||||
'_ssl',
|
||||
['_ssl.c'],
|
||||
depends=['socketmodule.h', '_ssl/debughelpers.c', '_ssl.h'],
|
||||
depends=[
|
||||
'socketmodule.h',
|
||||
'_ssl.h',
|
||||
'_ssl/debughelpers.c',
|
||||
'_ssl/misc.c',
|
||||
'_ssl/cert.c',
|
||||
],
|
||||
**openssl_extension_kwargs
|
||||
)
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue