Archived Forum Post

Index of archived forum posts


Verify signature with a certificate CER in a classic asp application

Apr 14 '16 at 08:26

I need to verify the signature below with a certificate CER in a classic asp application. Would Chilkat be able to do that?

<Notification ID="Notification">
  <Signature xmlns="">
      <CanonicalizationMethod Algorithm=""/>
      <SignatureMethod Algorithm=""/>
      <Reference URI="#Notification">
          <Transform Algorithm=""/>
          <Transform Algorithm=""/>
        <DigestMethod Algorithm=""/>


I've downloaded the trial but in the following code it ignores the certificate. What I'm I doing wrong?

' This CreateObject statement uses the new single-DLL ActiveX for v9.5.0
set crypt = CreateObject("Chilkat_9_5_0.Crypt2")

'  Any string argument automatically begins the 30-day trial.
success = crypt.UnlockComponent("30-day trial")
If (success <> 1) Then
End If

set cert = CreateObject("Chilkat_9_5_0.Cert")
success = cert.LoadFromFile ("c:\chilkat\certificate.cer")
if success = 0 then
end if

' this doesn't seem to work.
success = crypt.SetEncryptCert(cert)
If (success <> 1) Then
    Response.Write "
" Response.Write(crypt.LastErrorText) End If crypt.HashAlgorithm = "sha1" crypt.EncodingMode = "hex" ' sXML this is set further up and contains the XML Response.Write "

" hash = crypt.HashStringENC(sXML) Response.Write("SHA1: " & hash) Response.Write "
" cert = null crypt = null xml = null