(Visual FoxPro) List Certificates in the Current User Certificate Store (Windows Only)
This is a Windows-only example to list the certificates in the current-user certificate store (located in the Windows Registry).
LOCAL loCertStore
LOCAL lnReadOnly
LOCAL lnSuccess
LOCAL lnNumCerts
LOCAL i
LOCAL loCert
* This is a Windows-only example because it lists the certificates
* stored in the Windows Current User Certificate Store located in the
* Windows Registry.
* For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.CertStore')
loCertStore = CreateObject('Chilkat.CertStore')
lnReadOnly = 1
lnSuccess = loCertStore.OpenCurrentUserStore(lnReadOnly)
IF (lnSuccess = 0) THEN
? loCertStore.LastErrorText
RELEASE loCertStore
CANCEL
ENDIF
lnNumCerts = loCertStore.NumCertificates
i = 0
DO WHILE i < lnNumCerts
loCert = loCertStore.GetCertificate(i)
? "DN = " + loCert.SubjectDN
? "Email = " + loCert.SubjectE
i = i + 1
ENDDO
RELEASE loCertStore
|