2

I am trying to read digitally signed emails in EWS. Specifically I am interested in the file attachments in the email. I am using the following code with no success:

SignedCms signedCms = new SignedCms();
signedCms.Decode(filebyte)

Where filebyte is the smime.p7m attachment.

I get the error "ASN1 bad tag value met." on the second line of the code.

Can anybody help me figure out the issue? Am I missing a certificate on the machine that runs the code? Or is the certificate already in the smime.p7m? Am I not supposed to pass smime.p7m attachment to decode?

Dogahe
  • 1,380
  • 2
  • 20
  • 50
  • Are you sure its a good message ? The MSDN page says that it should throw a CryptographicException if there is a decryption problem. – Ahh ... It's a programming thi Jan 13 '16 at 02:29
  • I believe "ASN1 bad tag value met." is the message in the CryptographicException. So yes it is CryptographicException that I am getting with that message. – Dogahe Jan 13 '16 at 14:47

0 Answers0