santuario-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 41821] - Invalid Reference Signature when are used 2 or more Namespaces
Date Tue, 13 Mar 2007 22:09:10 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41821>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41821


sean.mullan@sun.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID




------- Additional Comments From sean.mullan@sun.com  2007-03-13 15:09 -------
This is not a bug. You need to always use the namespace-aware DOM L2
Element.setAttributeNS() method (instead of setAttribute) when creating
attributes, even namespace attributes. Otherwise, the C14n algorithm doesn't
"see" these namespace attributes when canonicalizing and that is why the
results did not match. I changed the following lines in your code and it now
works fine:

//element.setAttribute("xmlns:" + XML_SIGNATURE_PREFIX,
//                     XMLSignature.XMLNS);
//element.setAttributeNS("xmlns:" + XAdES_XMLNS_PREFIX,
//                       XAdES_XMLNS);
element.setAttributeNS("http://www.w3.org/2000/xmlns/", 
                       "xmlns:" + XAdES_XMLNS_PREFIX,
                       XAdES_XMLNS);
element.setAttributeNS("http://www.w3.org/2000/xmlns/", 
                       "xmlns:" + XML_SIGNATURE_PREFIX,
                       XMLSignature.XMLNS);







-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Mime
View raw message