Sample code for 30+ languages & platforms
Chilkat2-Python

Example: Crypt2.LastSignerCert method

Demonstrates how to call the LastSignerCert method.

Chilkat Chilkat2-Python Downloads

Chilkat2-Python
import sys
import chilkat2

success = False

crypt = chilkat2.Crypt2()

p7m_path = "qa_data/p7m/Firma.docx.p7m"
out_path = "qa_output/Firma.docx"

success = crypt.VerifyP7M(p7m_path,out_path)
if (success == False):
    print(crypt.LastErrorText)
    sys.exit()

# Examine the certificate(s) used for signing.
numSigners = crypt.NumSignerCerts
i = 0

cert = chilkat2.Cert()

while i < numSigners :
    crypt.LastSignerCert(i,cert)
    print("Signer: " + cert.SubjectDN)
    i = i + 1