Skip to content

Saml2Exception: Assertion signature could not be verified #24

Description

@felipemoreira2x

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 ?

Activity

  1. OsmanIslamSami commented on Aug 11, 2022

    @OsmanIslamSami

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions