PyCERT_CONTEXT.CertGetCertificateContextProperty

object = CertGetCertificateContextProperty(PropId)

Retrieves the specified property from the certificate

Parameters

PropId : int

One of the CERT_*_PROP_ID constants

PropId Returned value
CERT_ARCHIVED_PROP_IDBoolean
CERT_DATE_STAMP_PROP_IDPyTime
CERT_ACCESS_STATE_PROP_IDint
CERT_KEY_SPEC_PROP_IDint
CERT_DESCRIPTION_PROP_IDUnicode
CERT_FRIENDLY_NAME_PROP_IDUnicode
CERT_PVK_FILE_PROP_IDUnicode
CERT_AUTO_ENROLL_PROP_IDUnicode
CERT_HASH_PROP_IDString containing a hash
CERT_SHA1_HASH_PROP_IDString containing a hash
CERT_MD5_HASH_PROP_IDString containing a hash
CERT_SIGNATURE_HASH_PROP_IDString containing a hash
CERT_KEY_IDENTIFIER_PROP_IDString containing a hash
CERT_SUBJECT_NAME_MD5_HASH_PROP_IDString containing a hash
CERT_KEY_PROV_HANDLE_PROP_IDPyCRYPTPROV
CERT_SUBJECT_PUBLIC_KEY_MD5_HASH_PROP_IDString containing a hash
CERT_ISSUER_PUBLIC_KEY_MD5_HASH_PROP_IDString containing a hash
CERT_CTL_USAGE_PROP_IDEncoded CTL_USAGE, decode as X509_ENHANCED_KEY_USAGE (CTL_USAGE and CERT_ENHKEY_USAGE are identical)
CERT_ENHKEY_USAGE_PROP_IDEncoded CTL_USAGE. Can be decoded using cryptoapi::CryptDecodeObjectEx with X509_ENHANCED_KEY_USAGE
CERT_KEY_PROV_INFO_PROP_IDCRYPT_KEY_PROV_INFO dict
CERT_KEY_CONTEXT_PROP_IDDict representing CERT_KEY_CONTEXT struct
CERT_NEXT_UPDATE_LOCATION_PROP_IDEncoded CERT_ALT_NAME_INFO, decode using cryptoapi::CryptDecodeObjectEx with szOID_NEXT_UPDATE_LOCATION

Return Value

Type of object returned is dependent on the property id requested.