Sample code for 30+ languages & platforms
Classic ASP Requires Chilkat v11.0.0+

Transition from Cert.ExportPublicKey to Cert.GetPublicKey

Provides instructions for replacing deprecated ExportPublicKey method calls with GetPublicKey.

Chilkat Classic ASP Downloads

Classic ASP
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%
success = 0

set cert = Server.CreateObject("Chilkat.Cert")

'  ------------------------------------------------------------------------
'  The ExportPublicKey method is deprecated:

' publickeyObj is a Chilkat.PublicKey
Set publickeyObj = cert.ExportPublicKey()
If (cert.LastMethodSuccess = 0) Then
    Response.Write "<pre>" & Server.HTMLEncode( cert.LastErrorText) & "</pre>"
    Response.End
End If

'  ...
'  ...

'  ------------------------------------------------------------------------
'  Do the equivalent using GetPublicKey.
'  Your application creates a new, empty PublicKey object which is passed 
'  in the last argument and filled upon success.

set publickeyOut = Server.CreateObject("Chilkat.PublicKey")
success = cert.GetPublicKey(publickeyOut)
If (success = 0) Then
    Response.Write "<pre>" & Server.HTMLEncode( cert.LastErrorText) & "</pre>"
    Response.End
End If


%>
</body>
</html>