Sample code for 30+ languages & platforms
Tcl

Example: Crypt2.GetSignatureSigningTimeStr method

Demonstrates how to call the GetSignatureSigningTimeStr method.

Chilkat Tcl Downloads

Tcl

load ./chilkat.dll

set success 0

set crypt [new_CkCrypt2]

set success [CkCrypt2_VerifyP7M $crypt "qa_data/cades/CAdES-T/Signature-C-T-1.p7m" "qa_output/out.dat"]
if {$success == 0} then {
    puts [CkCrypt2_lastErrorText $crypt]
    delete_CkCrypt2 $crypt
    exit
}

set numSigners [CkCrypt2_get_NumSignerCerts $crypt]
puts "Num Signers = $numSigners"

set i 0
while {$i < $numSigners} {
    if {[CkCrypt2_HasSignatureSigningTime $crypt $i] == 1} then {
        puts [expr $i + 1]: [CkCrypt2_getSignatureSigningTimeStr $crypt $i]
    }     else {
        puts [expr $i + 1]: has no signing time.
    }

    set i [expr $i + 1]
}

# Sample output:

# Num Signers = 1
# 1: Sun, 03 Dec 2013 06:57:41 GMT

delete_CkCrypt2 $crypt