ASP Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript

ASP Examples

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

More Examples...
Email Object
FileAccess
RSS
Atom
Self-Extractor
Service
PPMD
Deflate
DH Key Exchange
DSA

Unreleased...
Bzip2
LZW
Icon

 

 

 

 

 

 

Export a Certificate to a .cer File

ASP script to export a certificate to a .cer certificate file.

<html>
<head>
<title>Export a Certificate to a .cer File</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 "Saving certificate: " & cert.SubjectDN & "<br>"
	
	' Serialize the certificate to a string.
	encodedCert = cert.GetEncoded()
	
	set fs=Server.CreateObject("Scripting.FileSystemObject") 
	set f=fs.CreateTextFile("c:\temp\myCert.cer",true) 
	f.WriteLine(encodedCert)
	f.Close
	set f=nothing
	set fs=nothing
	
end if


%>
</body>
</html>

 

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

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