DataFlex
DataFlex
Example: Crypt2.GetSignatureSigningTimeStr method
Demonstrates how to call the GetSignatureSigningTimeStr method.Chilkat DataFlex Downloads
Use ChilkatAx-win32.pkg
Procedure Test
Boolean iSuccess
Handle hoCrypt
Integer iNumSigners
Integer i
String sTemp1
Boolean bTemp1
Move False To iSuccess
Get Create (RefClass(cComChilkatCrypt2)) To hoCrypt
If (Not(IsComObjectCreated(hoCrypt))) Begin
Send CreateComObject of hoCrypt
End
Get ComVerifyP7M Of hoCrypt "qa_data/cades/CAdES-T/Signature-C-T-1.p7m" "qa_output/out.dat" To iSuccess
If (iSuccess = False) Begin
Get ComLastErrorText Of hoCrypt To sTemp1
Showln sTemp1
Procedure_Return
End
Get ComNumSignerCerts Of hoCrypt To iNumSigners
Showln "Num Signers = " iNumSigners
Move 0 To i
While (i < iNumSigners)
Get ComHasSignatureSigningTime Of hoCrypt i To bTemp1
If (bTemp1 = True) Begin
Get ComGetSignatureSigningTimeStr Of hoCrypt i To sTemp1
Showln (i + 1) ": " sTemp1
End
Else Begin
Showln (i + 1) ": has no signing time."
End
Move (i + 1) To i
Loop
// Sample output:
// Num Signers = 1
// 1: Sun, 03 Dec 2013 06:57:41 GMT
End_Procedure