Classic ASP
Classic ASP
Load CMS PKCS#7 Certificate (.p7b)
See more Certificates Examples
Loads a digital certificate from a Cryptographic Message Syntax Standard PKCS7 (.p7b) file and fetches information about the cert.Chilkat Classic ASP Downloads
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%
success = 0
set cert = Server.CreateObject("Chilkat.Cert")
' LoadFromFile will load virtually any certificate format file.
' It will auto-recognize the format and load appropiately.
success = cert.LoadFromFile("/Users/chilkat/testData/cer/chilkat.p7b")
If (success <> 1) Then
Response.Write "<pre>" & Server.HTMLEncode( cert.LastErrorText) & "</pre>"
Response.End
End If
' DN = "Distinguished Name"
Response.Write "<pre>" & Server.HTMLEncode( "SubjectDN:" & cert.SubjectDN) & "</pre>"
Response.Write "<pre>" & Server.HTMLEncode( "Common Name:" & cert.SubjectCN) & "</pre>"
Response.Write "<pre>" & Server.HTMLEncode( "Issuer Common Name:" & cert.IssuerCN) & "</pre>"
Response.Write "<pre>" & Server.HTMLEncode( "Serial Number:" & cert.SerialNumber) & "</pre>"
%>
</body>
</html>