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) Convert Certificate from DER to PEM.Loads a digital certificate from any format, such as DER, and saves to PEM format.
#include <CkCert.h> void ChilkatSample(void) { CkString strOut; CkCert cert; // LoadFromFile will load virtually any certificate format file. // It will auto-recognize the format and load appropiately. // In this case, load a DER format certificate and convert to PEM. bool success = cert.LoadFromFile("qa_data/certs/testCert.cer"); if (success != true) { strOut.append(cert.lastErrorText()); strOut.append("\r\n"); SetDlgItemText(IDC_EDIT1,strOut.getUnicode()); return; } success = cert.ExportCertPemFile("qa_data/certs/testCert.pem"); if (success != true) { strOut.append(cert.lastErrorText()); strOut.append("\r\n"); SetDlgItemText(IDC_EDIT1,strOut.getUnicode()); return; } strOut.append("Converted certificate from DER to PEM format."); strOut.append("\r\n"); SetDlgItemText(IDC_EDIT1,strOut.getUnicode()); } |
© 2000-2022 Chilkat Software, Inc. All Rights Reserved.