Lua Requires Chilkat v11.0.0+
Lua
Example: Crypt2.LastSignerCert method
Demonstrates how to call the LastSignerCert method.Chilkat Lua Downloads
local chilkat = require("chilkat")
local crypt = chilkat.Crypt2.new()
local p7m_path = "qa_data/p7m/Firma.docx.p7m"
local out_path = "qa_output/Firma.docx"
local success = crypt:verify_p7_m(p7m_path, out_path)
if not success then
print(crypt.last_error_text)
return
end
-- Examine the certificate(s) used for signing.
local numSigners = crypt.num_signer_certs
local i = 0
local cert = chilkat.Cert.new()
while i < numSigners do
crypt:last_signer_cert(i, cert)
print("Signer: " .. cert.subject_dn)
i = i + 1
end