Perl
Chilkat2 Perl
Example: Crypt2.GetSignatureSigningTimeStr method
Demonstrates how to call the GetSignatureSigningTimeStr method.Chilkat Perl Downloads
use strict;
use warnings;
use Chilkat2;
my $crypt = Chilkat2::Crypt2->new;
my $success = $crypt->VerifyP7M('qa_data/cades/CAdES-T/Signature-C-T-1.p7m', 'qa_output/out.dat');
if (!$success) {
print $crypt->LastErrorText, "\n";
exit;
}
my $numSigners = $crypt->NumSignerCerts;
print 'Num Signers = ', $numSigners, "\n";
my $i = 0;
while ($i < $numSigners) {
if ($crypt->HasSignatureSigningTime($i)) {
print $i + 1, ': ', $crypt->GetSignatureSigningTimeStr($i), "\n";
} else {
print $i + 1, ": has no signing time.\n";
}
$i = $i + 1;
}
# Sample output:
# Num Signers = 1
# 1: Sun, 03 Dec 2013 06:57:41 GMT