(Xojo Plugin) Apple Keychain - List Certificates
Iterates over the certificates in the Apple Keychain.
Note: This example requires Chilkat v10.0.0 or greater.
Dim certStore As New Chilkat.CertStore
// On MacOS and iOS, the OpenCurrentUserStore method opens the Keychain.
// The argument passed to OpenCurrentUserStore is ignored.
Dim success As Boolean
success = certStore.OpenCurrentUserStore(False)
If (success = False) Then
System.DebugLog(certStore.LastErrorText)
Return
End If
Dim numCerts As Int32
numCerts = certStore.NumCertificates
System.DebugLog("numCerts = " + Str(numCerts))
Dim i As Int32
i = 0
While i < numCerts
Dim cert As Chilkat.Cert
cert = certStore.GetCertificate(i)
System.DebugLog(cert.SubjectDN)
System.DebugLog(cert.SubjectCN)
System.DebugLog(cert.SerialNumber)
System.DebugLog("----")
i = i + 1
Wend
success = certStore.CloseCertStore()
|