ComponentSpace

Forums



Failed to generate the XML signature - Invalid algorithm specified


Failed to generate the XML signature - Invalid algorithm specified

Author
Message
alexey.korsakov
alexey.korsakov
New Member
New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)

Group: Forum Members
Posts: 5, Visits: 27
I have updated ComponentSpace library 2.6.0.7 -> 3.1. I also updated target framework 4.6.1 to 4.7.1

This is the only change which started throw exception in this line 
SAMLMessageSignature.Generate(samlResponseXml, cert.PrivateKey, cert);     

 
Message: ComponentSpace.SAML2.Exceptions.SAMLSignatureException : Failed to generate the XML signature.
----> System.Security.Cryptography.CryptographicException : Invalid algorithm specified.

Same certificate is used.

What is wrong?





ComponentSpace
ComponentSpace
ComponentSpace Development
ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)

Group: Administrators
Posts: 3.2K, Visits: 11K
In later releases we switched the default signature algorithm from SHA-1 to SHA-256.
We still support SHA-1 but recommend using SHA-256.
The most likely cause of the exception you're seeing is that the cryptographic service provider (CSP) associated with your private key doesn't support SHA-2.
The following forum post explains how to check this and use openssl to update your PFX file.
https://www.componentspace.com/Forums/1578/SHA256-and-Converting-the-Cryptographic-Service-Provider-Type
If there's still an issue, please enable SAML trace and send the generated log file as an email attachment to [email protected].
https://www.componentspace.com/Forums/17/Enabing-SAML-Trace


Regards
ComponentSpace Development
earl
earl
New Member
New Member (5 reputation)New Member (5 reputation)New Member (5 reputation)New Member (5 reputation)New Member (5 reputation)New Member (5 reputation)New Member (5 reputation)New Member (5 reputation)New Member (5 reputation)

Group: Forum Members
Posts: 7, Visits: 58
Hi,

Has this been resolved? We are also getting the same issue but our difference with alexey.korsakov case is that we did not update ComponentSpace library version. We just updated to .Net 4.7.2 from .Net 4.6.2. 
Any clue why this issue is happening? Same issue will happen if upgrading to .Net 4.7.1 but will be OK with .Net 4.7.

I hope you can provide some resolution.

Thanks,
Earl

earl
earl
New Member
New Member (5 reputation)New Member (5 reputation)New Member (5 reputation)New Member (5 reputation)New Member (5 reputation)New Member (5 reputation)New Member (5 reputation)New Member (5 reputation)New Member (5 reputation)

Group: Forum Members
Posts: 7, Visits: 58
earl - 10/18/2019
Hi,

Has this been resolved? We are also getting the same issue but our difference with alexey.korsakov case is that we did not update ComponentSpace library version. We just updated to .Net 4.7.2 from .Net 4.6.2. 
Any clue why this issue is happening? Same issue will happen if upgrading to .Net 4.7.1 but will be OK with .Net 4.7.

I hope you can provide some resolution.

Thanks,
Earl

By the way, version is 2.6.0.13
earl
earl
New Member
New Member (5 reputation)New Member (5 reputation)New Member (5 reputation)New Member (5 reputation)New Member (5 reputation)New Member (5 reputation)New Member (5 reputation)New Member (5 reputation)New Member (5 reputation)

Group: Forum Members
Posts: 7, Visits: 58
earl - 10/18/2019
earl - 10/18/2019
Hi,

Has this been resolved? We are also getting the same issue but our difference with alexey.korsakov case is that we did not update ComponentSpace library version. We just updated to .Net 4.7.2 from .Net 4.6.2. 
Any clue why this issue is happening? Same issue will happen if upgrading to .Net 4.7.1 but will be OK with .Net 4.7.

I hope you can provide some resolution.

Thanks,
Earl

By the way, version is 2.6.0.13

Just found out that this is an issue with Cryptographic Service Provider of certificate not supporting SHA-256.
ComponentSpace
ComponentSpace
ComponentSpace Development
ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)

Group: Administrators
Posts: 3.2K, Visits: 11K
Thanks for the update.

Regards
ComponentSpace Development
GO


Similar Topics


Execution: 0.000. 1 query. Compression Enabled.
Login
Existing Account
Email Address:


Password:


Select a Forum....












Forums, Documentation & Knowledge Base - ComponentSpace


Search