CkPython
CkPython
Example: Crypt2.LastSignerCert method
Demonstrates how to call the LastSignerCert method.Chilkat CkPython Downloads
import sys
import chilkat
success = False
crypt = chilkat.CkCrypt2()
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.get_NumSignerCerts()
i = 0
cert = chilkat.CkCert()
while i < numSigners :
crypt.LastSignerCert(i,cert)
print("Signer: " + cert.subjectDN())
i = i + 1