Chilkat HOME .NET Core C# Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi ActiveX Delphi DLL Go Java Lianja Mono C# Node.js Objective-C PHP ActiveX PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift 2 Swift 3,4,5... Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(DataFlex) Get Certificate PolicySee more Certificates ExamplesDemonstrates how to get a certificate's policy OIDs (if any)
Use ChilkatAx-win32.pkg Procedure Test Handle hoCert Boolean iSuccess String sOid String sStrXml Handle hoXml String sTemp1 Boolean bTemp1 Get Create (RefClass(cComChilkatCert)) To hoCert If (Not(IsComObjectCreated(hoCert))) Begin Send CreateComObject of hoCert End Get ComLoadFromFile Of hoCert "qa_data/certs/sample.cer" To iSuccess If (iSuccess = False) Begin Get ComLastErrorText Of hoCert To sTemp1 Showln sTemp1 Procedure_Return End // The certificatePolicies OID is 2.5.29.32 Move "2.5.29.32" To sOid Get ComGetExtensionAsXml Of hoCert sOid To sStrXml Get ComLastMethodSuccess Of hoCert To bTemp1 If (bTemp1 = True) Begin Showln sStrXml // Sample result: // <sequence><sequence><oid>2.16.840.1.101.2.1.11.39</oid></sequence></sequence> Get Create (RefClass(cComChilkatXml)) To hoXml If (Not(IsComObjectCreated(hoXml))) Begin Send CreateComObject of hoXml End Get ComLoadXml Of hoXml sStrXml To iSuccess Get ComGetChildContent Of hoXml "sequence|oid" To sTemp1 Showln "Policy OID = " sTemp1 End End_Procedure |
© 2000-2024 Chilkat Software, Inc. All Rights Reserved.