I'm converting the existing C# code which was written with interop and native calls to 100% managed code. The code is the API library which lets the caller to decrypt S/MIME
messages by passing the encrypted data and the array of certificate stores where to search for the certificates.
With Win32 API (used by the current implementation of the API library I'm working on), CryptDecryptMessage
accepts CRYPT_DECRYPT_MESSAGE_PARA
structure which lets me specify the array of certificate stores to search (rghCertStore
field). I can't find out how I can reproduce the same with EnvelopedCms
class.
EnvelopedCms.Decrypt
method overloads let me specify the collection of certificates to search but I need the ability to specify the collection of certificate stores. Is it possible?