santuario-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Labarthe Dubois" <>
Subject Re: JDOM - Sign validation
Date Fri, 07 Apr 2006 17:39:02 GMT
you can try saving the XML to a file, and reading from it,
when traspasing from one format to another and viceversa. JDOM <-> DOM

moreover, i usually use IBMXMLSecurity suite to test the file just 
java dsig.VerifyGUI "filename.xml"

  ----- Original Message ----- 
  From: chirsmail sapl 
  Sent: Friday, April 07, 2006 2:31 PM
  Subject: Re: JDOM - Sign validation

  thanks for the reply.When i print DOM and DOM converted from JDOM seems to be same.I see
lot of difference on the object level of signed DOM and DOM converted from JDOM.Because the
signing of DOM converted from JDOM work well.After updating the DOM into JDOM and then convert
the JDOM back to DOM ,the vaildation fails.

  I think if i get the exact singed DOM out of JDOM , i should be able to valid the sign.But
don't know how to get the exact DOM out of JDOM for validation.

  Martin Labarthe Dubois <> wrote:
    Yes. in this case i also saw both of them identical from the c14n perspective.

    You must have some other difference.

      ----- Original Message ----- 
      From: David Wall - Yozons Inc. 
      Sent: Friday, April 07, 2006 2:09 PM
      Subject: Re: JDOM - Sign validation

        Thanks for the reply.
        1)The different is on the byte level.When we print the byte of the orignal DOM and
DOM converted from JDOM , the size is different.
        2)The DOM converted from JDOM has the white space if the element doesn't have the
        For example :
        Orignal XML content:
        <?xml version="1.0" encoding="UTF-8"?>
        <div id="main"></div>

        DOM o/p using XMLUtils.outputDOMc14nWithComments(
        <div id="main"></div>

        JDOM O/P converted from DOM using XMLOutputter:
        <?xml version="1.0" encoding="UTF-8"?>
        <div id="main" />

        I think thats why it doesn't valid the DOM converted from JDOM.
        Can any expert suggest me a way to resolve the issue.
      Isn't the point of canonicalization to remove such problems from syntactically equivalent
XML?   It seems that the element is the same, has the same value and same attributes with
the same values, so they should be treated as the same data from a digital signing perspective.


  Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1ยข/min.
View raw message