(AutoIt) 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).
; This is a Windows-only example because it lists the certificates
; stored in the Windows Current User Certificate Store located in the
; Windows Registry.
$oCertStore = ObjCreate("Chilkat.CertStore")
Local $bReadOnly = True
Local $bSuccess = $oCertStore.OpenCurrentUserStore($bReadOnly)
If ($bSuccess = False) Then
ConsoleWrite($oCertStore.LastErrorText & @CRLF)
Exit
EndIf
Local $iNumCerts = $oCertStore.NumCertificates
Local $i = 0
While $i < $iNumCerts
Local $oCert = $oCertStore.GetCertificate($i)
ConsoleWrite("DN = " & $oCert.SubjectDN & @CRLF)
ConsoleWrite("Email = " & $oCert.SubjectE & @CRLF)
$i = $i + 1
Wend
|