PyCERT_CONTEXT.CertSetCertificateContextProperty

CertSetCertificateContextProperty(PropId, Data, Flags)

Sets a property for a certificate

Parameters

PropId : int

Id of property to be set, CERT_*_PROP_ID

Data : object

The value to be set for the property. Type is dependent on PropId. Use None to delete a property.

Flags=0 : int

Combination of CERT_SET_* flags

PropId Type of input


CERT_ARCHIVED_PROP_IDNone causes Archived flag to be cleared, any other causes it to be set no actual data, non-NULL pvData indicates presence of flag
CERT_DATE_STAMP_PROP_IDPyDateTime specifying when cert was added to store
CERT_DESCRIPTION_PROP_IDUnicode string
CERT_FRIENDLY_NAME_PROP_IDUnicode string
CERT_PVK_FILE_PROP_IDUnicode string
CERT_AUTO_ENROLL_PROP_IDUnicode string
CERT_KEY_SPEC_PROP_IDInt, usually AT_KEYEXCHANGE or AT_SIGNATURE
CERT_HASH_PROP_IDString containing the hash
CERT_SHA1_HASH_PROP_IDString containing the hash
CERT_MD5_HASH_PROP_IDString containingg the hash
CERT_SIGNATURE_HASH_PROP_IDString containing the hash
CERT_KEY_IDENTIFIER_PROP_IDString containing the key id
CERT_SUBJECT_PUBLIC_KEY_MD5_HASH_PROP_IDString containing the hash
CERT_ISSUER_PUBLIC_KEY_MD5_HASH_PROP_IDString containing the hash
CERT_SUBJECT_NAME_MD5_HASH_PROP_IDString containing the hash
CERT_RENEWAL_PROP_IDString containing the hash
CERT_ENHKEY_USAGE_PROP_IDString containing an encoded PyCTL_USAGE. Use cryptoapi::CryptEncodeObjectEx with X509_ENHANCED_KEY_USAGE.
CERT_CTL_USAGE_PROP_IDSame as CERT_ENHKEY_USAGE_PROP_ID