Closed
Description
In CPython 3.10 there were private APIs SSLObject.get_verified_chain()
and _ssl.Certificate.public_bytes(_ssl.ENCODING_DER)
methods added.
Ref: python/cpython#25467
import hashlib
import _ssl
fingerprints = [hashlib.sha256(cert.public_bytes(_ssl.ENCODING_DER)).hexdigest() for cert in sock._sslobj.get_verified_chain()]
Metadata
Metadata
Assignees
Labels
No labels