Chilkat HOME Android™ Classic ASP C C++ C# Mono C# .NET Core C# C# UWP/WinRT DataFlex Delphi ActiveX Delphi DLL Visual FoxPro Java Lianja MFC Objective-C Perl PHP ActiveX PHP Extension PowerBuilder PowerShell PureBasic CkPython Chilkat2-Python Ruby SQL Server Swift 2 Swift 3,4,5... Tcl Unicode C Unicode C++ Visual Basic 6.0 VB.NET VB.NET UWP/WinRT VBScript Xojo Plugin Node.js Excel Go
(C# UWP/WinRT) Load PFX (PKCS#12) and List CertificatesLoads a PFX file (.pfx, .p12) and iterates over the certificates found within.
Chilkat.CertStore certStore = new Chilkat.CertStore(); bool success; string pfxPath = "/Users/chilkat/testData/pfx/chilkat_ssl.pfx"; string pfxPassword = "test"; success = certStore.LoadPfxFile(pfxPath,pfxPassword); if (success != true) { Debug.WriteLine(certStore.LastErrorText); return; } int numCerts = certStore.NumCertificates; Debug.WriteLine("PFX contains " + Convert.ToString(numCerts) + " certificates"); int i = 0; while (i < numCerts) { Chilkat.Cert cert = certStore.GetCertificate(i); Debug.WriteLine(Convert.ToString(i) + ": (Common Name) " + cert.SubjectCN); Debug.WriteLine(Convert.ToString(i) + ": (Serial Number) " + cert.SerialNumber); Debug.WriteLine(Convert.ToString(i) + ": (Distinguished Name) " + cert.SubjectDN); i = i + 1; } |
© 2000-2022 Chilkat Software, Inc. All Rights Reserved.