-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Namespace prefix on root creates invalid signatures #59
Comments
I'll share my code as well which works now and signature is validated using
|
So this is not a bug? |
Your post made it sound like you solved your problem? |
Ah, no, sorry if I'm being a pain... I just wanted to add my code in full incase I am missing something... I meant that it is producing valid signatures IF I don't have any namespace prefix on the root element. |
Is this one dea, or something someone is looking at? |
As I understand it the signature validates with xmlsec1 but the other tool your using doesn’t like it. this would require us to 1) have an example of a file it does like, 2) have access to the tool |
We are also experiencing this issue. We validated using multiple tools, and having a namespace prefix in the root element causes validation issues. Use an online validator like: Steps to re-create <InitSessionSignedRequest
xmlns="http://example.com/online/types/2021/10/01/0001"
xmlns:ns2="http://example.com/types/2021/10/01/0001"
xmlns:ns3="http://example.com/online/auth/request/2021/10/01/0001">
</InitSessionSignedRequest>
The below example fails when using a root prefix: <ns3:InitSessionSignedRequest
xmlns="http://example.com/online/types/2021/10/01/0001"
xmlns:ns2="http://example.com/types/2021/10/01/0001"
xmlns:ns3="http://example.com/online/auth/request/2021/10/01/0001">
</ns3:InitSessionSignedRequest> We tried multiple permutations and transforms, and the issue appears related to how the XML (and prefix) root is being handled in this library. |
Working through my issues trying to solve the Peppol (Peppol.eu) standard signature I realized that the signature becomes invalid if the root element has a namespace prefix...
This snippet generates a valid signature:
But adding the prefix to the root generates a invalid signature:
The text was updated successfully, but these errors were encountered: