I have a function that read content of signed file (eg. [MYFILE].xml.p7m) by this code:
Dim signedCms As New SignedCms()
signedCms.Decode([MYFILEBYTES])
Dim content As Byte() = signedCms.ContentInfo.Content
Unfortunately I need to run this program on an old "Windows Server 2003 R2" system, but it generate this exception:
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Security.Cryptography.CryptographicException
Stack:
at System.Security.Cryptography.Pkcs.SignedCms.OpenToDecode(Byte[],
System.Security.Cryptography.Pkcs.ContentInfo, Boolean)
at System.Security.Cryptography.Pkcs.SignedCms.Decode(Byte[])
with message "Unknown cryptographic algorithm".
On another "Windows Server 2003 R2" machine, it works correctly.
My question is: what component should I install on "Windows Server 2003 R2" for the signedCms.Decode statement to work correctly?