![]() |
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
(PowerBuilder) 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.
integer li_rc oleobject loo_Crypt oleobject loo_CmsOptions string ls_OutputFile string ls_InFile integer li_Success loo_Crypt = create oleobject li_rc = loo_Crypt.ConnectToNewObject("Chilkat.Crypt2") if li_rc < 0 then destroy loo_Crypt MessageBox("Error","Connecting to COM object failed") return end if // Tell Chilkat to also validate the timestamp token if a timestamp exists in the CMS message's unauthenticated attributes. loo_CmsOptions = create oleobject li_rc = loo_CmsOptions.ConnectToNewObject("Chilkat.JsonObject") loo_CmsOptions.UpdateBool("ValidateTimestampTokens",1) loo_Crypt.CmsOptions = loo_CmsOptions.Emit() ls_OutputFile = "qa_output/original.xml" ls_InFile = "qa_data/p7m/fattura_signature.xml.p7m" // Verify the signature and extract the contained file, which in this case is XML. li_Success = loo_Crypt.VerifyP7M(ls_InFile,ls_OutputFile) if li_Success = 0 then Write-Debug loo_Crypt.LastErrorText destroy loo_Crypt destroy loo_CmsOptions return end if Write-Debug "Signature validated." destroy loo_Crypt destroy loo_CmsOptions |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.