login about faq

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="http://www.w3.org/2000/09/xmldsig#">
      <CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
      <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
      <Reference URI="#Notification">
          <Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
          <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
        <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>

asked Apr 13 '16 at 23:52

Peter%20M's gravatar image

Peter M

edited Apr 14 '16 at 08:25

jpbro's gravatar image

jpbro ♦

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

answered Apr 14 '16 at 00:58

Peter%20M's gravatar image

Peter M

edited Apr 14 '16 at 08:26

jpbro's gravatar image

jpbro ♦

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Apr 13 '16 at 23:52

Seen: 1,945 times

Last updated: Apr 14 '16 at 08:26

powered by OSQA