Classic ASP
Classic ASP
Transition from Email.GetSignedByCertChain to Email.LastSignerCert
Provides instructions for replacing deprecated GetSignedByCertChain method calls with LastSignerCert.Chilkat Classic ASP Downloads
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%
success = 0
set email = Server.CreateObject("Chilkat.Email")
' ...
' ...
' ------------------------------------------------------------------------
' The GetSignedByCertChain method is deprecated:
' certChainObj is a Chilkat.CertChain
Set certChainObj = email.GetSignedByCertChain()
If (email.LastMethodSuccess = 0) Then
Response.Write "<pre>" & Server.HTMLEncode( email.LastErrorText) & "</pre>"
Response.End
End If
' ...
' ...
' ------------------------------------------------------------------------
' Do the equivalent using LastSignerCert to get the signing certificate,
' then build the cert chain from the signing certificate object.
set signerCert = Server.CreateObject("Chilkat.Cert")
success = email.LastSignerCert(0,signerCert)
If (success = 0) Then
Response.Write "<pre>" & Server.HTMLEncode( email.LastErrorText) & "</pre>"
Response.End
End If
' Get the certificate chain from the signer certificate.
set certChain = Server.CreateObject("Chilkat.CertChain")
success = signerCert.BuildCertChain(certChain)
If (success = 0) Then
Response.Write "<pre>" & Server.HTMLEncode( signerCert.LastErrorText) & "</pre>"
Response.End
End If
%>
</body>
</html>