Perl Requires Chilkat v11.0.0+
Chilkat2 Perl
Example: Crypt2.LastSignerCert method
Demonstrates how to call the LastSignerCert method.Chilkat Perl Downloads
use strict;
use warnings;
use Chilkat2;
my $crypt = Chilkat2::Crypt2->new;
my $p7m_path = 'qa_data/p7m/Firma.docx.p7m';
my $out_path = 'qa_output/Firma.docx';
my $success = $crypt->VerifyP7M($p7m_path, $out_path);
if (!$success) {
print $crypt->LastErrorText, "\n";
exit;
}
# Examine the certificate(s) used for signing.
my $numSigners = $crypt->NumSignerCerts;
my $i = 0;
my $cert = Chilkat2::Cert->new;
while ($i < $numSigners) {
$crypt->LastSignerCert($i, $cert);
print 'Signer: ', $cert->SubjectDN, "\n";
$i = $i + 1;
}