PHP ActiveX
PHP ActiveX
Example: Crypt2.LastSignerCert method
Demonstrates how to call the LastSignerCert method.Chilkat PHP ActiveX Downloads
<?php
$success = 0;
$crypt = new COM("Chilkat.Crypt2");
$p7m_path = 'qa_data/p7m/Firma.docx.p7m';
$out_path = 'qa_output/Firma.docx';
$success = $crypt->VerifyP7M($p7m_path,$out_path);
if ($success == 0) {
print $crypt->LastErrorText . "\n";
exit;
}
// Examine the certificate(s) used for signing.
$numSigners = $crypt->NumSignerCerts;
$i = 0;
$cert = new COM("Chilkat.Cert");
while ($i < $numSigners) {
$crypt->LastSignerCert($i,$cert);
print 'Signer: ' . $cert->SubjectDN . "\n";
$i = $i + 1;
}
?>