Included InclusiveNamespaces PrefixList for Reference/Signature and Fixed setAttributeNS Problem #218
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The current implementation doesn't support the construction and processing of InclusiveNamespaces for Transforming/Canonicalizing. This pull request includes the possibility to pre-set specific Namespaces for referenced-/signedinfo-elements during the Canonicaliztion-Process and compressed the processing of that info on a private Method.
Another Problem occuring was, that the DOMNode->setAttributeNS() is not registering the Namespace URI properly, so that it doesn't react as expected on the C14N call if it's namespace-prefix is in the prefixList!
This Problem is avoidable if the Attribute is first created on the Document and then applied to the Node! That way the namespace gets registered properly.
This might solve #211
Edit: There is a Problem with the correct Canonicalization of the SignedInfo if you try to use Include Namespaces not held by the Template but by the Document to be signed! (I oversaw, that one should already be solved in the sign Method!)
Another Problem occurs if you append a new Element with a differing Namespace to an already appended Element! The Namespaces are not properly registered on the Parent Nodes. A possible workaround is to reconstruct the Node-Tree! Otherwise the Canonicalization doesn't seem to always work properly.