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

SAML Response validation fails #71

Closed kinjalhinguss closed 1 year ago

kinjalhinguss commented 1 year ago

I am getting the below error on signedXml.CheckSignature(certificate, true) line.

System.NullReferenceException HResult=0x80004003 Message=Object reference not set to an instance of an object. Source=System.Security.Cryptography.Xml StackTrace: at System.Security.Cryptography.Xml.SignedXml.IsKeyTheCorrectAlgorithm(AsymmetricAlgorithm key, Type expectedType)

Can you please guide me on this?

alex-jitbit commented 1 year ago

I suggest you debug the code step by step and see which var is null exactly