Sample code for 30+ languages & platforms
AutoIt

Example: Crypt2.LastSignerCert method

Demonstrates how to call the LastSignerCert method.

Chilkat AutoIt Downloads

AutoIt
Local $bSuccess = False

$oCrypt = ObjCreate("Chilkat.Crypt2")

Local $sP7m_path = "qa_data/p7m/Firma.docx.p7m"
Local $sOut_path = "qa_output/Firma.docx"

$bSuccess = $oCrypt.VerifyP7M($sP7m_path,$sOut_path)
If ($bSuccess = False) Then
    ConsoleWrite($oCrypt.LastErrorText & @CRLF)
    Exit
EndIf

; Examine the certificate(s) used for signing.
Local $iNumSigners = $oCrypt.NumSignerCerts
Local $i = 0

$oCert = ObjCreate("Chilkat.Cert")

While $i < $iNumSigners
    $oCrypt.LastSignerCert($i,$oCert)
    ConsoleWrite("Signer: " & $oCert.SubjectDN & @CRLF)
    $i = $i + 1
Wend