Closed thetrime closed 4 years ago
Thanks. Applied after edit of commit message. Hope this is the end of XML signatures :)
You might want to add some tests for these signatures as this seems very sensitive to things that may look like innocent changes.
This changes the behaviour of the parser so that if keep_prefix(true) is specified then attributes also have a ns/2, if appropriate.
It also changes c14n2.pl to deal with these ns/2 objects, including a fix for the case where 2 different prefixes refer to the same URI. For example:
The critical point being that xmlns:ns1 and xmlns:ns2 are both 'some_namespace'. Once we have loaded the structure, we cannot tell what 'some_namespace':qux is: Is it ns1 or ns2? (Of course, the sensible answer of: "Who cares? They're both the same URI!" only applies if you're not trying to make a hash of the result for XML signature verification)