Handle to a certificate store
-
Closes the certificate store
-
Controls sychronization of the certificate store
-
Lists all certificates in the store
-
Finds all Certificate Trust Lists in store.
-
Serializes the store to memory or a file
-
CertAddEncodedCertificateToStore
Imports an encoded certificate into the store
-
CertAddCertificateContextToStore
Adds a certificate context to the store
-
Adds a link to a cert in another store
-
Adds a certificate trust list to the store
-
Adds a link to a CTL in another store
-
Adds a sibling store to a store collection
-
Removes a sibling store from a store collection
-
Exports certificates and associated private keys in PKCS#12 format
-
int HCERTSTORE
Integer handle
PyCERTSTORE.CertAddCTLContextToStore
PyCTL_CONTEXT = CertAddCTLContextToStore(CtlContext, AddDisposition
) Adds a certificate trust list to the store
-
CtlContext : PyCTL_CONTEXT
CTL to be added
-
AddDisposition : int
CERT_STORE_ADD_* constant
PyCERTSTORE.CertAddCTLLinkToStore
PyCTL_CONTEXT = CertAddCTLLinkToStore(CtlContext, AddDisposition
) Adds a link to a CTL in another store
-
CtlContext : PyCTL_CONTEXT
CTL to be linked
-
AddDisposition : int
One of the CERT_STORE_ADD_* values
PyCERTSTORE.CertAddCertificateContextToStore
PyCERT_CONTEXT = CertAddCertificateContextToStore(CertContext, AddDisposition
) Adds a certificate context to the store
-
CertContext : PyCERT_CONTEXT
Certificate context to be added
-
AddDisposition : int
CERT_STORE_ADD_* constant
PyCERTSTORE.CertAddCertificateLinkToStore
PyCERT_CONTEXT = CertAddCertificateLinkToStore(CertContext, AddDisposition
) Adds a link to a cert in another store
-
CertContext : PyCERT_CONTEXT
Certificate context to be linked
-
AddDisposition : int
One of the CERT_STORE_ADD_* values
PyCERTSTORE.CertAddEncodedCertificateToStore
PyCERT_CONTEXT = CertAddEncodedCertificateToStore(CertEncodingType, CertEncoded
, AddDisposition
) Imports an encoded certificate into the store
-
CertEncodingType : int
Usually X509_ASN_ENCODING combined with PKCS_7_ASN_ENCODING
-
CertEncoded : buffer
Data containing a serialized certificate
-
AddDisposition : int
Combination of CERT_STORE_ADD_* flags
PyCERTSTORE.CertAddStoreToCollection
CertAddStoreToCollection(SiblingStore, UpdateFlag, Priority) Adds a sibling store to a store collection
-
SiblingStore : PyCERTSTORE
Store to be added to the collection
-
UpdateFlag=0 : int
Can be CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG to enable changes to persist
-
Priority=0 : int
Determines order in which store are searched and updated
A collection store is created by using cryptoapi::CertOpenStore
with CERT_STORE_PROV_COLLECTION
PyCERTSTORE.CertCloseStore
CertCloseStore(Flags) Closes the certificate store
-
Flags=0 : int
Combination of CERT_CLOSE_*_FLAG flags
PyCERTSTORE.CertControlStore
CertControlStore(Flags, CtrlType, CtrlPara) Controls sychronization of the certificate store
-
Flags : int
One of the CERT_STORE_CTRL_*_FLAG flags
-
CtrlType : int
One of the CERT_STORE_CTRL_* flags
-
CtrlPara : PyHANDLE
Event handle, can be None (not used with CERT_STORE_CTRL_COMMIT)
PyCERTSTORE.CertEnumCTLsInStore
[PyCTL_CONTEXT,...] = CertEnumCTLsInStore() Finds all Certificate Trust Lists in store
PyCERTSTORE.CertEnumCertificatesInStore
[PyCERT_CONTEXT,...] = CertEnumCertificatesInStore() Lists all certificates in the store
PyCERTSTORE.CertRemoveStoreFromCollection
CertRemoveStoreFromCollection(SiblingStore) Removes a sibling store from a collection
-
SiblingStore : PyCERTSTORE
Store to be removed from the collection
PyCERTSTORE.CertSaveStore
CertSaveStore(MsgAndCertEncodingType, SaveAs, SaveTo, SaveToPara, Flags) Serializes the store to memory or a file
-
MsgAndCertEncodingType : int
Only used when saveas is CERT_STORE_SAVE_AS_PKCS7 - usually X509_ASN_ENCODING combined with PKCS_7_ASN_ENCODING
-
SaveAs : int
One of the CERT_STORE_SAVE_AS_* constants
-
SaveTo : int
One of the CERT_STORE_SAVE_TO_* constants (CERT_STORE_SAVE_TO_MEMORY not supported yet)
-
SaveToPara : PyHANDLE/string
File name or open file handle depending on SaveTo parm
-
Flags=0 : int
Reserved, use 0
PyCERTSTORE.PFXExportCertStoreEx
bytes = PFXExportCertStoreEx(Password, Flags
) Exports certificates and associated private keys in PKCS#12 format
-
Password=None : str
Passphrase to be used to encrypt the output
-
Flags=EXPORT_PRIVATE_KEYS|REPORT_NO_PRIVATE_KEY|REPORT_NOT_ABLE_TO_EXPORT_PRIVATE_KEY : int
Options to be used while exporting