Closed AlexeyAKat closed 2 years ago
The following test code works on Windows and throws an exception on linux:
var envelopedCms = new EnvelopedCms(); // throws an exception envelopedCms.Decode(msg);
Exception stack trace:
Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException: Unknown error (0x0) at Internal.Cryptography.Pal.Windows.HelpersWindows.GetMsgParamAsMemory(SafeCryptMsgHandle hCryptMsg, CryptMsgParamType paramType, Int32 index) at Internal.Cryptography.Pal.Windows.DecryptorPalWindows.Decode(Byte[] encodedMessage, Int32& version, ContentInfo& contentInfo, AlgorithmIdentifier& contentEncryptionAlgorithm, X509Certificate2Collection& originatorCerts, CryptographicAttributeObjectCollection& unprotectedAttributes) at Internal.Cryptography.Pal.Windows.PkcsPalWindows.Decode(Byte[] encodedMessage, Int32& version, ContentInfo& contentInfo, AlgorithmIdentifier& contentEncryptionAlgorithm, X509Certificate2Collection& originatorCerts, CryptographicAttributeObjectCollection& unprotectedAttributes) at System.Security.Cryptography.Pkcs.EnvelopedCms.Decode(Byte[] encodedMessage)
OS: Ubuntu 18.04.4 LTS, .net core 3.1 (SDK 3.1.202, runtime 3.1.4), Crypto-Pro CSP 5.0.11732 KC1, instruction Linux.md was used, corefx ver.3.1.1.241 (4.7.0-dev.20175.1) from link .
Основная работа по поддержке CMS шифрования тут: https://github.com/CryptoPro/corefx/issues/56
The following test code works on Windows and throws an exception on linux:
Exception stack trace:
OS: Ubuntu 18.04.4 LTS, .net core 3.1 (SDK 3.1.202, runtime 3.1.4), Crypto-Pro CSP 5.0.11732 KC1, instruction Linux.md was used, corefx ver.3.1.1.241 (4.7.0-dev.20175.1) from link .