Self-signed certificate with RSACng unsupported?

Hello,

EDIT: This problem does not seem to occur in an earlier version of ComponentSpace.SAML2.dll (2.6.0.21). The version that gives the error has version 2.7.0.0.

I created a self-signed test certificate using makecert (following the PDF guide, similar to the lines below):
makecert -r -pe -sky exchange -n “cn=www.idp.com” -sv idp.pvk idp.cer
pvk2pfx -pvk idp.pvk -spc idp.cer -pfx idp.pfx -po password -f

However, when using this new certificate i get the following error:
An exception of type ‘ComponentSpace.SAML2.Exceptions.SAMLSignatureException’ occurred in ComponentSpace.SAML2.dll but was not handled in user code
The key type is not supported: System.Security.Cryptography.RSACng

Should I choose another cryptographic provider?

Regards
Fredrik

Please refer to the Makecert and SHA-256 XML Signatures section of the Developer Guide.
The correct cryptographic service provider is the the Microsoft Enhanced RSA and AES Cryptographic Provider. This CSP is type 24.
You can use openssl to convert your PFX if you prefer. Otherwise, generate a new PFX as described in the Developer Guide.
http://www.componentspace.com/Forums/1578/SHA256-and-Converting-the-Cryptographic-Service-Provider-Type

[quote]
fcaesar - 5/29/2017
Hello,

EDIT: This problem does not seem to occur in an earlier version of ComponentSpace.SAML2.dll (2.6.0.21). The version that gives the error has version 2.7.0.0.

I created a self-signed test certificate using makecert (following the PDF guide, similar to the lines below):
makecert -r -pe -sky exchange -n "cn=www.idp.com" -sv idp.pvk idp.cer
pvk2pfx -pvk idp.pvk -spc idp.cer -pfx idp.pfx -po password -f

However, when using this new certificate i get the following error:
An exception of type 'ComponentSpace.SAML2.Exceptions.SAMLSignatureException' occurred in ComponentSpace.SAML2.dll but was not handled in user code
The key type is not supported: System.Security.Cryptography.RSACng

Should I choose another cryptographic provider?

Regards
Fredrik
[/quote]

Did you ever get this to work? I keep receiving the same error as well.

RSACng was added in the .NET framework v4.6.
Support for RSACng has been added to v2.7.1 of the ComponentSpace.SAML2 DLL.
Please contact us if you require this support and you’re using an earlier version of the DLL.