login about faq

I'm having an issue decoding encrypted emails that are also digitally signed. I have no problem with either signed emails or encrypted emails, both decode and allow access to the email body and attachment(s).

This is using the ActiveX Crypt2 and Mime packages, current version.

  1. For encrypted emails, I use the CkDecryptFile method, then load the decrypted smime file and use the UnwrapSecurity method followed by GetPart to extract all the mime parts.

  2. For signed emails, I use the UnwrapSecurity method followed by GetPart.

This works great for both signed and encrypted emails, but fails for signed/encrypted emails. If I follow 1) above for signed/encrypted, I end up with a smime.p7m attachment. If I try to decode that using UnwrapSecurity, I end up with a corrupted mime file, with non-ascii characters embedded.

Would appreciate any suggestions on alternate methods for doing this, or where I might be going wrong.

asked Sep 27 '17 at 20:44

MikeSchmidt's gravatar image


Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Sep 27 '17 at 20:44

Seen: 1,008 times

Last updated: Sep 27 '17 at 20:44

powered by OSQA