(Classic ASP) Example: Crypt2.LastSignerCert method
Demonstrates how to call the LastSignerCert method. Note: This example requires Chilkat v11.0.0 or greater.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%
set crypt = Server.CreateObject("Chilkat.Crypt2")
p7m_path = "qa_data/p7m/Firma.docx.p7m"
out_path = "qa_output/Firma.docx"
success = crypt.VerifyP7M(p7m_path,out_path)
If (success = 0) Then
Response.Write "<pre>" & Server.HTMLEncode( crypt.LastErrorText) & "</pre>"
Response.End
End If
' Examine the certificate(s) used for signing.
numSigners = crypt.NumSignerCerts
i = 0
set cert = Server.CreateObject("Chilkat.Cert")
Do While i < numSigners
success = crypt.LastSignerCert(i,cert)
Response.Write "<pre>" & Server.HTMLEncode( "Signer: " & cert.SubjectDN) & "</pre>"
i = i + 1
Loop
%>
</body>
</html>
|