.NET Core中的SignedCms替代品

时间:2016-12-01 18:59:32

标签: c# .net-core

.NET Core中是否存在System.Security.Cryptography.Pkcs.SignedCms类的替代方法?或者我是否必须深入研究BouncyCastle,就像他们在WinRT案例中那样? Is there an alternative of SignedCMS in WinRT?

2 个答案:

答案 0 :(得分:1)

不,目前还没有相当于.NET Core中的SignedCms。

非常欢迎您在https://github.com/dotnet/corefx/issues上创建一个问题,以表明它是您想要被带来的类型。

答案 1 :(得分:1)

仅供参考,以防万一。
似乎可以通过此NUGET软件包获得对SignedCms和其他基本的S / MIME .NET类的支持:

System.Security.Cryptography.Pkcs

即在将此NUGET程序包添加到Visual Studio 2017(VS2017).NET Core项目之前,我收到以下编译错误:

Severity    Code    Description Project File    Line    Suppression State
Error   CS0246  The type or namespace name 'CmsRecipientCollection' could not be found (are you missing a using directive or an assembly reference?)
Error   CS0246  The type or namespace name 'X509IssuerSerial' could not be found (are you missing a using directive or an assembly reference?)
Error   CS0246  The type or namespace name 'EnvelopedCms' could not be found (are you missing a using directive or an assembly reference?)
Error   CS0246  The type or namespace name 'SignedCms' could not be found (are you missing a using directive or an assembly reference?)
Error   CS0246  The type or namespace name 'SignerInfoCollection' could not be found (are you missing a using directive or an assembly reference?)
Error   CS0246  The type or namespace name 'ContentInfo' could not be found (are you missing a using directive or an assembly reference?)
Error   CS0246  The type or namespace name 'CmsRecipient' could not be found (are you missing a using directive or an assembly reference?)
Error   CS0246  The type or namespace name 'RecipientInfo' could not be found (are you missing a using directive or an assembly reference?)
Error   CS0103  The name 'SubjectIdentifierType' does not exist in the current context
Error   CS0246  The type or namespace name 'SignerInfo' could not be found (are you missing a using directive or an assembly reference?)
Error   CS1579  foreach statement cannot operate on variables of type 'SignerInfoCollection' because 'SignerInfoCollection' does not contain a public instance definition for 'GetEnumerator'
Error   CS0246  The type or namespace name 'CmsSigner' could not be found (are you missing a using directive or an assembly reference?)

添加NUGET程序包后,我可以成功编译。