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) Find and Load Certificate by ThumbprintDemonstrates how to find and load a certificate by SHA1 thumbprint. This is a Microsoft Windows-only example. It assumes the certificate is already installed on the Windows system. Note: This example requires Chilkat v9.5.0.83 or greater.
#include <CkCert.h> void ChilkatSample(void) { CkString strOut; // This example requires Chilkat v9.5.0.83 or greater. CkCert cert; // The thumbprint can be passed in any encoding, such as hex, base64, etc. // The 2nd argument indicates the encoding of the 1st argument. bool success = cert.LoadByThumbprint("ea5a129c1919a52d238ee28d9f3a8f345b768388","hex"); if (success == false) { strOut.append(cert.lastErrorText()); strOut.append("\r\n"); SetDlgItemText(IDC_EDIT1,strOut.getUnicode()); return; } strOut.append("Found: "); strOut.append(cert.subjectDN()); strOut.append("\r\n"); SetDlgItemText(IDC_EDIT1,strOut.getUnicode()); } |
© 2000-2022 Chilkat Software, Inc. All Rights Reserved.