PowerBuilder
PowerBuilder
Example: Crypt2.GetSignatureSigningTimeStr method
Demonstrates how to call the GetSignatureSigningTimeStr method.Chilkat PowerBuilder Downloads
integer li_rc
integer li_Success
oleobject loo_Crypt
integer li_NumSigners
integer i
li_Success = 0
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
li_Success = loo_Crypt.VerifyP7M("qa_data/cades/CAdES-T/Signature-C-T-1.p7m","qa_output/out.dat")
if li_Success = 0 then
Write-Debug loo_Crypt.LastErrorText
destroy loo_Crypt
return
end if
li_NumSigners = loo_Crypt.NumSignerCerts
Write-Debug "Num Signers = " + string(li_NumSigners)
i = 0
do while i < li_NumSigners
if loo_Crypt.HasSignatureSigningTime(i) = 1 then
Write-Debug string(i + 1) + ": " + loo_Crypt.GetSignatureSigningTimeStr(i)
else
Write-Debug string(i + 1) + ": has no signing time."
end if
i = i + 1
loop
// Sample output:
// Num Signers = 1
// 1: Sun, 03 Dec 2013 06:57:41 GMT
destroy loo_Crypt