-
Notifications
You must be signed in to change notification settings - Fork 173
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
Merge changes from datagovsg fork #161
Conversation
Update Asana/xml-crypto with upstream changes
Patch for non exclusive c14n
- removed an old (~5y ago) hack for windows store XML canonicalization (and removed the test) - fixed an issue with over-eager prefix inclusion in non-exclusive c14n algorithm (+ test) - replaced a test for empty-URI that is impossible to update (because the private key is missing)
…he output of transforms returns a node-set rather than an octet stream, which is whenever there are no transforms or the last transform is enveloped signature. Add back test for when canonicalization method is not specified in transforms
…tion Fix default canonicalization Summary: According to the Digest Method Spec [1], the DigestMethod takes a octet stream, ad if the output of the URI dereference is a node set instead, it needs to be converted as described in the Reference Processing Spec [2] to an octet stream. The Reference Processing Spec says to use Canonical XML. Enveloped Signature returns a node-set, as does dereferencing a same-document reference [3], [4]. Canonicalization algorithms are the only other transforms we support, and they all return an octet stream, so the only times we need to add canonicalization are if we haven't done any transforms or if the last one is enveloped signature. https://www.w3.org/TR/xmldsig-core1/#sec-DigestMethod https://www.w3.org/TR/xmldsig-core1/#sec-ReferenceProcessingModel https://www.w3.org/TR/xmldsig-core1/#sec-EnvelopedSignature https://www.w3.org/TR/xmldsig-core1/#sec-Same-Document Tests: Added back the test from when this was implemented slightly differently for Windows Mobile, checked against a SamlResponse without a canonicalization method in the transforms Reviewer: @srir
212200b changed the xpath to match all signature nodes descended from the specified local node. This is incorrect; the relevant spec says that only immediate signature elements should be removed This commit corrects the behaviour simply by changing the xpath to only match immediate children Fixes node-saml#135 , where further discussion can be found
Hi, @LoneRifle added you as collaborator. |
I intend to make one more edit to Thanks for having me look into this! |
what's your npm username? |
it's |
done! can you bump a major version before publishing? given the amount of changes seems safer. also there is a github notification on a vulnerable dependency in the current source (hapijs / hoek). |
Sure, will do! I'll look into the vuln, bumping the major release, and possibly #160 |
thanks, you do awesome work! |
This fork currently embodies fixes that addresses the following issues:
Fixes #113
Fixes #153
Fixes #158
Fixes #135
These are currently held in the datagovsg fork of xml-crypto, itself a fork of the Asana fork of the original.
I would also like to take the opportunity to request access to the repo so that I can merge changes, and access to the npm package so that I can cut releases for this library.