Sample code for 30+ languages & platforms
CkPython

List Certificates in the Current User Certificate Store (Windows Only)

See more Certificates Examples

This is a Windows-only example to list the certificates in the current-user certificate store (located in the Windows Registry).

Chilkat CkPython Downloads

CkPython
import sys
import chilkat

success = False

# This is a Windows-only example because it lists the certificates
# stored in the Windows Current User Certificate Store located in the
# Windows Registry.

certStore = chilkat.CkCertStore()

readOnly = True
success = certStore.OpenCurrentUserStore(readOnly)
if (success == False):
    print(certStore.lastErrorText())
    sys.exit()

cert = chilkat.CkCert()
numCerts = certStore.get_NumCertificates()
i = 0
while i < numCerts :
    certStore.GetCert(i,cert)
    print("DN = " + cert.subjectDN())
    print("Email = " + cert.subjectE())
    i = i + 1