Sample code for 30+ languages & platforms
Perl

Example: Crypt2.GetSignatureSigningTimeStr method

Demonstrates how to call the GetSignatureSigningTimeStr method.

Chilkat Perl Downloads

Perl
use chilkat();

$success = 0;

$crypt = chilkat::CkCrypt2->new();

$success = $crypt->VerifyP7M("qa_data/cades/CAdES-T/Signature-C-T-1.p7m","qa_output/out.dat");
if ($success == 0) {
    print $crypt->lastErrorText() . "\r\n";
    exit;
}

$numSigners = $crypt->get_NumSignerCerts();
print "Num Signers = " . $numSigners . "\r\n";

$i = 0;
while ($i < $numSigners) {
    if ($crypt->HasSignatureSigningTime($i) == 1) {
        print ($i + 1) . ": " . $crypt->getSignatureSigningTimeStr($i) . "\r\n";
    }
    else {
        print ($i + 1) . ": has no signing time." . "\r\n";
    }

    $i = $i + 1;
}

# Sample output:

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