SmimeSetSignedCmsOnVerify Property

Namespace: MailBee.Security
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.2.0 build 630 for .NET 4.5
Syntax
public bool SetSignedCmsOnVerify { get; set; }

Property Value

Type: Boolean
If true, MailBee will populate SignedCmsResult property with SignedCms object in SmimeResult object returned by methods capable of message signature verification in case if the message does have signature. If false, SignedCmsResult property will always remain a null reference (Nothing in Visual Basic). The default value is false.
Remarks

Starting from .NET Standard 2.0 edition (.NET Core 2.0, UWP on Windows 10 Fall Creators Update level), MailBee always uses SignedCms for cryptographic verification operations. So if you enable SetSignedCmsOnVerify there, MailBee will just return the same object it used internally. No extra overhead.

In .NET Framework edition, however, MailBee can sometimes use Win32 API for the same. In this case, instantiating SignedCms object will be an expensive operation so it's recommended to enable this property only if you need the S/MIME message info which is not otherwise returned by other properties of SmimeResult class. Verification methods which deal with certificate stores are Win32-based (Verify(MailMessage, MessageVerificationFlags, CertificateStore)) while the methods which deal with certificate collections (Verify2(MailMessage, MessageVerificationFlags, X509Certificate2Collection)) use SignedCms.

.NET Standard 2.0 edition, on other hand, Win32-based functionality is not available (and Verify(MailMessage, MessageVerificationFlags, CertificateStore) methods simply don't exist).

Finally, .NET Core 1.0/1.1 does not support SignedCms and always operates through Win32 API. Therefore, SetSignedCmsOnVerify has no effect there.

See Also