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
(MFC) Load PEM Format Certificate (.pem)Loads a PEM format digital certificate and fetches information about the cert.
#include <CkCert.h> void ChilkatSample(void) { CkString strOut; CkCert cert; bool success; // LoadFromFile will load virtually any certificate format file. // It will auto-recognize the format and load appropiately. success = cert.LoadFromFile("/Users/chilkat/testData/cer/cert.pem"); if (success != true) { strOut.append(cert.lastErrorText()); strOut.append("\r\n"); SetDlgItemText(IDC_EDIT1,strOut.getUnicode()); return; } // DN = "Distinguished Name" strOut.append("SubjectDN:"); strOut.append(cert.subjectDN()); strOut.append("\r\n"); strOut.append("Common Name:"); strOut.append(cert.subjectCN()); strOut.append("\r\n"); strOut.append("Issuer Common Name:"); strOut.append(cert.issuerCN()); strOut.append("\r\n"); strOut.append("Serial Number:"); strOut.append(cert.serialNumber()); strOut.append("\r\n"); SetDlgItemText(IDC_EDIT1,strOut.getUnicode()); } |
© 2000-2022 Chilkat Software, Inc. All Rights Reserved.