Hi,
We have a .Net 4.6.1 WebApp using ComponentPro.Saml version 6.1.140.41005. The solution has been operational for 4 years now but last week started to have issues with the Sign method that results in the followingerror:
[CryptographicException: Invalid algorithm specified.
]
System.Security.Cryptography.CryptographicException.ThrowCryptographicException(Int32 hr) 38
System.Security.Cryptography.Utils.SignValue(SafeKeyHandle hKey, Int32 keyNumber, Int32 calgKey, Int32 calgHash, Byte[] hash, Int32 cbHash, ObjectHandleOnStack retSignature) 0
System.Security.Cryptography.Utils.SignValue(SafeKeyHandle hKey, Int32 keyNumber, Int32 calgKey, Int32 calgHash, Byte[] hash) 64
System.Security.Cryptography.RSACryptoServiceProvider.SignHash(Byte[] rgbHash, Int32 calgHash) 177
System.Security.Cryptography.RSAPKCS1SignatureFormatter.CreateSignature(Byte[] rgbHash) 130
System.Security.Cryptography.AsymmetricSignatureFormatter.CreateSignature(HashAlgorithm hash) 59
System.Security.Cryptography.Xml.SignedXml.ComputeSignature() 264
ComponentPro.Saml.SignableSamlObject.c_YGU(String c_CHU, AsymmetricAlgorithm c_AHU, KeyInfo c_GFU, SignedXml c_XGU, String c_DHU) 251
[SamlException: Unable to generate XML signature.]
ComponentPro.Saml.SignableSamlObject.c_YGU(String c_CHU, AsymmetricAlgorithm c_AHU, KeyInfo c_GFU, SignedXml c_XGU, String c_DHU) 302
ComponentPro.Saml.SignableSamlObject.c_YGU(String c_CHU, AsymmetricAlgorithm c_AHU, X509Certificate2Collection c_EHU, SignedXml c_XGU, String c_DHU) 273
ComponentPro.Saml.SignableSamlObject.c_YGU(String c_CHU, AsymmetricAlgorithm c_AHU, X509Certificate2 c_MFU, SignedXml c_XGU, String c_DHU) 150
ComponentPro.Saml.SignableSamlObject.Sign(AsymmetricAlgorithm signingKey, X509Certificate2 x509Certificate, String inclusiveNamespacesPrefixList) 48
ComponentPro.Saml.SignableSamlObject.Sign(X509Certificate2 x509Certificate) 43
Could you please let me know what is the issue as we did not change any of the code, and certainly did not change the certificate? Would it be related to Windows Update (perhaps removing support for an algorithm ) ? How can we solve this problem?
Thanks
Las
edited 7/29/2020 9:13:26 AM
asked 7/29/2020 8:52:06 AM