jitbit / AspNetSaml

Very simple SAML 2.0 consumer module for ASP.NET/C#
https://www.jitbit.com
Apache License 2.0
361 stars 118 forks source link

Error in SAML response - SignatureDescription could not be created for the signature algorithm supplied #80

Closed vishnureddydotnet closed 1 year ago

vishnureddydotnet commented 1 year ago

I am facing issue in samlResponse.IsValid() method. The code is breaking at this point return ValidateSignatureReference(signedXml) && signedXml.CheckSignature(_certificate, true) && !IsExpired();

The method signedXml.CheckSignature(_certificate, true) is returning an exception : "SignatureDescription could not be created for the signature algorithm supplied."

The error is happening in IsValid() method in file Saml.cs (Line no- 74)

In The Saml response which we are getting in XmlDocument object there is a line: ds:SignedInfo>

But the link http://www.w3.org/2001/10/xml-exc-c14n# opens as a web page. Is that correct behavior?

What could be the possible cause of this and how to resolve this? Please help. Thanks in advance.

alex-jitbit commented 1 year ago

Which .NET version?

vishnureddydotnet commented 1 year ago

Which .NET version? .NET version of our application is 4.6.1

alex-jitbit commented 1 year ago

Upgrading to at least 4.6.2 should resolve this