Chilkat HOME Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi DLL Go Java Node.js Objective-C PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(Xojo Plugin) Apple Keychain - List Certs on Smartcards and USB TokensSee more Apple Keychain ExamplesIterates over the certificatse on connected smartcards and USB tokens via the Apple Keychain. Note: This example requires Chilkat v10.0.0 or greater.
Dim certStore As New Chilkat.CertStore // On MacOS and iOS, the OpenSmartcard method opens the Keychain. // The argument passed to OpenSmartcard is ignored. Dim success As Boolean success = certStore.OpenSmartcard("") 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 // Note: Chilkat also gets the associated private key if it exists. // You can simply use the cert in other places in Chilkat where a cert w/ private key is required. Dim cert As Chilkat.Cert cert = certStore.GetCertificate(i) System.DebugLog(cert.SubjectDN) System.DebugLog(cert.SubjectCN) System.DebugLog(cert.SerialNumber) If (cert.IsRsa() = True) Then System.DebugLog("key type is RSA") End If If (cert.IsEcdsa() = True) Then System.DebugLog("key type is ECDSA") End If System.DebugLog("has private key: " + Str(cert.HasPrivateKey())) System.DebugLog("----") i = i + 1 Wend success = certStore.CloseCertStore() |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.