ASP Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript

ASP Examples

ASP String
ASP Byte Array
Bounced Mail
Character Encoding
Digital Certificates
Digital Signatures
Email
FTP
HTML-to-XML
HTTP
IMAP
Encryption
MHT / HTML Email
S/MIME
Socket
Spider
RSA Encryption
Tar
ASP Upload
XML
XMP
Zip Compression

More Examples...
Email Object
POP3
SMTP
RSS
Atom
Self-Extractor

Unreleased...
Service
PPMD
Deflate
Bzip2
LZW
Bz2
DH Key Exchange
DSA
Icon

 

 

 

 

 

 

Serialize Certificate to/from a String

ASP script to serialize a digital certificate to a string, and then later re-create the certificate object from the encoded string.

<html>
<head>
<title>Serialize and unserialize a certificate</title>
</head>
<body>
<%
' Get an object to create a certificate store object
set ccs = Server.CreateObject("ChilkatCertificate.ChilkatCreateCS")

' Open the local machine certificate store.
set certStore = ccs.OpenLocalSystemStore()

' Find the certificate matching the email address "matt@chilkatsoft.com"
set cert = certStore.FindCertBySubjectE("matt@chilkatsoft.com")
if (cert is Nothing) then
	Response.write "Certificate not found!"
else
	Response.write "Found certificate: " & cert.SubjectDN & "<br>"
	
	' Serialize the certificate to a string.
	encodedCert = cert.GetEncoded()
	Response.write "Encoded: " & encodedCert & "<br>"
	
	' Re-create the certificate object from an encoded string.
	set cert2 = Server.CreateObject("ChilkatCertificate.ChilkatCert")
	cert2.SetFromEncoded(encodedCert)
	
	Response.Write "Re-created: " & cert2.SubjectDN
end if


%>
</body>
</html>

 

Need a specific example? Send a request to support@chilkatsoft.com

© 2000-2008 Chilkat Software, Inc. All Rights Reserved.