Skip to content

Conversation

@Icegloo24
Copy link

@Icegloo24 Icegloo24 commented Oct 21, 2020

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.

@tomekpolska
Copy link

When will be the PR merged? I need it desperately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants