PyCERT_CONTEXT Object

Handle to a certificate context

Methods

CertFreeCertificateContext
Frees the context handle 

CertEnumCertificateContextProperties
Lists property ids for the certificate 

CryptAcquireCertificatePrivateKey
Retrieves the private key associated with the certificate 

CertGetIntendedKeyUsage
Returns the intended key usage from the certificate extensions 

CertGetEnhancedKeyUsage
Finds the enhanced key usage property and/or extension for the certificate 

CertSerializeCertificateStoreElement
Serializes the certificate and its properties 

CertVerifySubjectCertificateContext
Checks the validity of the certificate 

CertDeleteCertificateFromStore
Removes the certificate from its store 

CertGetCertificateContextProperty
Retrieves the specified property from the certificate 

CertSetCertificateContextProperty
Sets a property for a certificate 

Properties

int HANDLE
Pointer to CERT_CONTEXT struct

PyCERTSTORE CertStore
Handle to the certificate store that contains this certificate

str CertEncoded
Content of the certificate as encoded bytes

int CertEncodingType
Method used to encode the certifcate, usually X509_ASN_ENCODING or PKCS_7_ASN_ENCODING

int Version
One of the CERT_V* values

PyUnicode Subject
Encoded CERT_NAME_INFO struct containing the subject name. Can be decoded using cryptoapi::CryptDecodeObjectEx with X509_UNICODE_NAME, or formatted using cryptoapi::CertNameToStr

PyUnicode Issuer
Certificate Authority that issued certificate as encoded CERT_NAME_INFO. Use cryptoapi::CryptDecodeObjectEx to decode into individual components, or cryptoapi::CertNameToStr to return a single formatted string

PyDateTime NotBefore
Beginning of certificate's period of validity

PyDateTime NotAfter
End of certificate's period of validity

str SignatureAlgorithm
Object id of the certifcate's signature algorithm

(PyCERT_EXTENSION,...) Extension
Sequence of CERT_EXTENSION dicts containing certificate's extensions

PyCERT_PUBLIC_KEY_INFO SubjectPublicKeyInfo
Encoded public key of certificate

int SerialNumber
Serial number assigned by the issuer