(Classic ASP) Example: Crypt2.SetSigningCert method
Demonstrates how to call the SetSigningCert method.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%
' Signing certificates can be obtained from many different sources..
' Load from a PFX
set cryptA = Server.CreateObject("Chilkat.Crypt2")
set certA = Server.CreateObject("Chilkat.Cert")
success = certA.LoadPfxFile("c:/someDir/pfx_files/a.pfx","pfx_file_password")
success = cryptA.SetSigningCert(certA)
' ...
' Load from a smart card or USB token.
set cryptB = Server.CreateObject("Chilkat.Crypt2")
set certB = Server.CreateObject("Chilkat.Cert")
certB.SmartCardPin = "123456"
success = certB.LoadFromSmartcard("")
success = cryptB.SetSigningCert(certB)
' ...
' Load from a the Windows certificate store or macOS keychain
set cryptC = Server.CreateObject("Chilkat.Crypt2")
set certC = Server.CreateObject("Chilkat.Cert")
success = certC.LoadByCommonName("Xyz 123")
success = cryptC.SetSigningCert(certC)
' ...
%>
</body>
</html>
|