Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
Java 1.4.6
-
Security Level: Public (Public issues, viewable by everyone)
-
None
Description
This test case, added in the 1.4.6 release, does the following:
NamedNodeMap attributes = signedInfo.getAttributes();
boolean foundBase = false;
for (int i = 0; i < attributes.getLength(); i++) {
Node attribute = attributes.item;
if ("base".equals(attribute.getLocalName())
&& "http://www.acme.com/resources/subresources/".equals(attribute.getNodeValue()))
}
if (!foundBase)
However, if you inspect the above, you'll notice that what it is doing is verifying a change to the input document, rather than verifying that the output is correct.
I ran across this issue when porting the Santuario library to use the GenXDM library, and the ported version of the c14n code does not modify the input document, which means that this test fails after the port.
I could change my port of the library to actually modify the original document - as an optional feature - but that seems like an anti-feature, rather than a benefit, so I'm requesting that the test case itself be updated.
Patch to follow.