.NET Core中的SignedCms替代方案

5

2
准备好迎接BouncyCastle的体验吧,我的朋友 :) - jariq
2个回答

5

如果有帮助的话,供您参考。看起来支持 SignedCms 和其他关键的 .NET 类库用于 S/MIME 的方式是通过这个 NUGET 软件包提供的:

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软件包后,编译成功。


是的,他们在一段时间之前将其添加到了 .NET Core 平台扩展中。已经使用了一段时间了。 - Alex

2

谢谢,我已经在那里创建了一个问题。 - Alex

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接