Sample code for 30+ languages & platforms
Lianja

Example: Crypt2.LastSignerCert method

Demonstrates how to call the LastSignerCert method.

Chilkat Lianja Downloads

Lianja
llSuccess = .F.

loCrypt = createobject("CkCrypt2")

lcP7m_path = "qa_data/p7m/Firma.docx.p7m"
lcOut_path = "qa_output/Firma.docx"

llSuccess = loCrypt.VerifyP7M(lcP7m_path,lcOut_path)
if (llSuccess = .F.) then
    ? loCrypt.LastErrorText
    release loCrypt
    return
endif

// Examine the certificate(s) used for signing.
lnNumSigners = loCrypt.NumSignerCerts
i = 0

loCert = createobject("CkCert")

do while i < lnNumSigners
    loCrypt.LastSignerCert(i,loCert)
    ? "Signer: " + loCert.SubjectDN
    i = i + 1
enddo


release loCrypt
release loCert