![]() |
Chilkat HOME Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi DLL Go Java Node.js Objective-C PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(DataFlex) Verify the Timestamp Server Token (if any) while Validating a CMS SignatureDemonstrates how to also validate the timestamp server token (if any) while validating a CMS signature.
Use ChilkatAx-win32.pkg Procedure Test Handle hoCrypt Handle hoCmsOptions Boolean iSuccess String sOutputFile String sInFile Boolean iSuccess String sTemp1 Get Create (RefClass(cComChilkatCrypt2)) To hoCrypt If (Not(IsComObjectCreated(hoCrypt))) Begin Send CreateComObject of hoCrypt End // Tell Chilkat to also validate the timestamp token if a timestamp exists in the CMS message's unauthenticated attributes. Get Create (RefClass(cComChilkatJsonObject)) To hoCmsOptions If (Not(IsComObjectCreated(hoCmsOptions))) Begin Send CreateComObject of hoCmsOptions End Get ComUpdateBool Of hoCmsOptions "ValidateTimestampTokens" True To iSuccess Get ComEmit Of hoCmsOptions To sTemp1 Set ComCmsOptions Of hoCrypt To sTemp1 Move "qa_output/original.xml" To sOutputFile Move "qa_data/p7m/fattura_signature.xml.p7m" To sInFile // Verify the signature and extract the contained file, which in this case is XML. Get ComVerifyP7M Of hoCrypt sInFile sOutputFile To iSuccess If (iSuccess = False) Begin Get ComLastErrorText Of hoCrypt To sTemp1 Showln sTemp1 Procedure_Return End Showln "Signature validated." End_Procedure |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.