Need to understand the flow of certificate (Failed to verify signature error)

Hi there,

I am using component space 2.0 for authenticating user from ADFS (2.0) with SAML 2.0 ,

I have simulate the Authentication with ADFS using example provided with codes and provided certificates, but whenever I try in our code with our self-signed certificate I am getting Failed to verify signature error,

Please help me here,

I wanted to understand what, how certificates will use to encrypt the SAML auth Request and decrypt the response

Thanks

Please note there is a distinction between encryption/decryption and signature generation/verification.
I think you’re referring to signature verification.
Is the signature verification error occurring at ADFS or your application?
The most likely cause is that the wrong certificate has been configured.
If the signature verification error is at ADFS, ensure the correct certificate is configured under the Signature tab of the relying party properties.
If the signature verification error is at your application, ensure the correct certificate is configured as the PartnerCertificateFile in your saml.config.
If there’s still an issue, please enable SAML trace and send the generated log file as an email attachment to support@componentspace.com mentioning your forum post.
https://www.componentspace.com/Forums/17/Enabing-SAML-Trace

[quote]
ComponentSpace - 7/5/2018
Please note there is a distinction between encryption/decryption and signature generation/verification.
I think you're referring to signature verification.
Is the signature verification error occurring at ADFS or your application?
The most likely cause is that the wrong certificate has been configured.
If the signature verification error is at ADFS, ensure the correct certificate is configured under the Signature tab of the relying party properties.
If the signature verification error is at your application, ensure the correct certificate is configured as the PartnerCertificateFile in your saml.config.
If there's still an issue, please enable SAML trace and send the generated log file as an email attachment to support@componentspace.com mentioning your forum post.
https://www.componentspace.com/Forums/17/Enabing-SAML-Trace
[/quote]

I am getting this issue while SAMLMessageSignature.Generate with certificate, I used a self signed certificate generated in my local IIS Manager.

It’s most likely that your certificate doesn’t support SHA-256 signatures.
Please refer to the following forum post which describes how to use openssl to update your PFX file to specify the correct CSP.
https://www.componentspace.com/Forums/1578/SHA256-and-Converting-the-Cryptographic-Service-Provider-Type