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 to DER encoded X.509 Certificate (.cer, .crt)Loads a digital certificate from any format and saves to a binary DER encoded X.509 Certificate (.cer, .crt).
#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. // In this case, load a PEM format certificate and convert to DER. success = cert.LoadFromFile("/Users/chilkat/testData/pem/chilkat.pem"); if (success != true) { strOut.append(cert.lastErrorText()); strOut.append("\r\n"); SetDlgItemText(IDC_EDIT1,strOut.getUnicode()); return; } success = cert.ExportCertDerFile("chilkat.der"); if (success != true) { strOut.append(cert.lastErrorText()); strOut.append("\r\n"); SetDlgItemText(IDC_EDIT1,strOut.getUnicode()); return; } strOut.append("Converted certificate from PEM to DER format."); strOut.append("\r\n"); SetDlgItemText(IDC_EDIT1,strOut.getUnicode()); } |
© 2000-2022 Chilkat Software, Inc. All Rights Reserved.