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

Saml2Exception: Assertion signature could not be verified #24

Open
felipemoreira2x opened this issue Jul 11, 2022 · 1 comment
Open

Comments

@felipemoreira2x
Copy link

Hi!
First of all, thank you to made this amazing project to handle saml authentication!

Second, i have this exception:
image

The xml saml response sent by azure looks ok, but somehow fail in this point i can´t figute out why.

Can you help me please ?

@OsmanIslamSami
Copy link

comment the following two lines inside XmlSignatureUtils.cs if the signature is already verified.

//var result = signedXml.CheckSignature(alg); //Edited
//return result;

/// Verifies the signature of the XmlElement instance using the key given as a parameter.
/// true if the element's signature can be verified. false if the signature could
/// not be verified.
/// if the XmlDocument instance does not contain a signed XML element.
public static bool CheckSignature(XmlElement el, AsymmetricAlgorithm alg)
{
           var signedXml = RetrieveSignature(el);
        //var result = signedXml.CheckSignature(alg); //Edited
        //return result;

        return true;
}

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

No branches or pull requests

2 participants