Skip to content
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

fix Unable to verify the signature from response #1

Merged
merged 1 commit into from Oct 19, 2020

Conversation

oguennec
Copy link
Owner

Attempt to solve Unable to verify the signature from issue 106:

galkahana commented on 18 Mar 2019
I had this error with one of the IDPs i'm using. cert was fine. Two things helped to resolve this:

Force upgrade xml-crypto to 1.2.0 yarn add xml-crypto@latest. the later version is a bit more able.
Changed the code a bit be more lax as to the location of the signature.
changed this:
signature = xmlcrypto.xpath(doc, "./[local-name(.)='Signature' and namespace-uri(.)='http://www.w3.org/2000/09/xmldsig#']")
to this:
signature = xmlcrypto.xpath(doc, "/
/*[local-name(.)='Signature' and namespace-uri(.)='http://www.w3.org/2000/09/xmldsig#']")

@oguennec oguennec self-assigned this Oct 19, 2020
@oguennec oguennec merged commit 36501ed into master Oct 19, 2020
@oguennec oguennec deleted the fix/unable-to-verify-the-signature branch October 20, 2020 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant