(Lianja) 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). Note: This example requires Chilkat v10.1.2 or greater.
// This is a Windows-only example because it lists the certificates
// stored in the Windows Current User Certificate Store located in the
// Windows Registry.
loCertStore = createobject("CkCertStore")
llReadOnly = .T.
llSuccess = loCertStore.OpenCurrentUserStore(llReadOnly)
if (llSuccess = .F.) then
? loCertStore.LastErrorText
release loCertStore
return
endif
loCert = createobject("CkCert")
lnNumCerts = loCertStore.NumCertificates
i = 0
do while i < lnNumCerts
loCertStore.GetCert(i,loCert)
? "DN = " + loCert.SubjectDN
? "Email = " + loCert.SubjectE
i = i + 1
enddo
release loCertStore
release loCert
|