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">
  <Type>ApplicationSubmit</Type>
  <ResourceKey>Application::05b826e4-4652-4394-b81f-18ce35fe7664</ResourceKey>
  <Endpoint>https://nhmrcomnistaruat.f1solutions.com.au/Services/V1/ApplicationInterop.svc</Endpoint>
  <InterestedParty></InterestedParty>
  <Expiry>2016-05-06T11:18:31.7000000</Expiry>
  <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
    <SignedInfo>
      <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">
        <Transforms>
          <Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
          <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
        </Transforms>
        <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
        <DigestValue>eSEJVV6WggnzmtL7Fig98hX5BHU=</DigestValue>
      </Reference>
    </SignedInfo>
    <SignatureValue>p6Wng8SEolEogMWYmHgf10K4QffC76VsfrkFenFdco9wBvVL6tMaCgdCqFu66AEdgvqu+JgnHllay5fjTY3duM2bYRvumiw2wGCghfOSQXFA9bLm1Vau/OtrYOqtluzLWAaJL7lG0rmsg26jSOmQQLw9ryaZ4xct0cxfMfBtfbVLvGtBfJEswgFYgZyQKfkCB+O7iojjvQDNzMz2mdD6v2PfspfYRSVK1VpiQ03A559W2OxlVTKgI9z9UrhUgxndUoB+orTjEnwI6RS3u9IaN7+E+YMYot99DnndzAibRr64uT9B3narrhpSuAdFqdzPdqudW/10GHqKHLwWwentzA==</SignatureValue>
  </Signature>
</Notification>

asked Apr 13 at 23:52

Peter%20M's gravatar image

Peter M
1

edited Apr 14 at 08:25

jpbro's gravatar image

jpbro ♦
1.1k2618


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
    Response.Write(crypt.LastErrorText)
    Response.End
End If

set cert = CreateObject("Chilkat_9_5_0.Cert")
success = cert.LoadFromFile ("c:\chilkat\certificate.cer")
if success = 0 then
    Response.Write(cert.LastErrorText)
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
link

answered Apr 14 at 00:58

Peter%20M's gravatar image

Peter M
1

edited Apr 14 at 08:26

jpbro's gravatar image

jpbro ♦
1.1k2618

Your answer
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

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

Tags:

×12

Asked: Apr 13 at 23:52

Seen: 308 times

Last updated: Apr 14 at 08:26

powered by OSQA