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) Get Issuer Certificate InformationSee more Certificates ExamplesA certificate contains information about its issuer. This example demonstrates how to get the issuer information from a certificate.
#include <CkCert.h> void ChilkatSample(void) { CkString strOut; CkCert cert; bool success = cert.LoadFromFile("qa_data/certs/sample.cer"); if (success == false) { strOut.append(cert.lastErrorText()); strOut.append("\r\n"); SetDlgItemText(IDC_EDIT1,strOut.getUnicode()); return; } // Get issuer information: // ----------------------------------------------------------------------- // (Not all subject fields may exist depending on the issuer certificate.) // ----------------------------------------------------------------------- // Issuer DN (Distinguished Name, i.e. all the Issuer subject parts) strOut.append("DN: "); strOut.append(cert.issuerDN()); strOut.append("\r\n"); // Common Subject parts: // Issuer Common Name strOut.append("CN: "); strOut.append(cert.issuerCN()); strOut.append("\r\n"); // Issuer Country strOut.append("C: "); strOut.append(cert.issuerC()); strOut.append("\r\n"); // Issuer Email address strOut.append("E: "); strOut.append(cert.issuerE()); strOut.append("\r\n"); // Issuer Locality strOut.append("L: "); strOut.append(cert.issuerL()); strOut.append("\r\n"); // Issuer Organization strOut.append("O: "); strOut.append(cert.issuerO()); strOut.append("\r\n"); // Issuer Organizational Unit strOut.append("OU: "); strOut.append(cert.issuerOU()); strOut.append("\r\n"); // Issuer State strOut.append("S: "); strOut.append(cert.issuerS()); strOut.append("\r\n"); SetDlgItemText(IDC_EDIT1,strOut.getUnicode()); } |
© 2000-2022 Chilkat Software, Inc. All Rights Reserved.