have a two mails (SMIME encrypted) for a single recipient. One mail is 
encrypted using 3DES, the other one is encrypted using AES 256.

The mails where created using the C# EnvelopedCms class 
(http://msdn.microsoft.com/en-us/library/system.security.cryptography.pkcs.envelopedcms%28v=vs.100%29.aspx).

I can successfully decrypt the 3DES message using

openssl smime -decrypt -in trippledes.eml -inkey keyfile.pem

However, if I try this with the AES encrypted file, OpenSSL outputs some 
gibberish and Fails with this comment:

Error decrypting PKCS#7 structure 4128:error:06065064:digital envelope 
routines:EVP_DecryptFinal_ex:bad decrypt:.\crypto\evp\evp_enc.c:539:

Thunderbird cannot open the mail either. But Outlook 2010 has no problem 
opening the message.

I've already examined the ASN.1 structure of both mails using the ASN.1 Decoder 
on http://lapo.it/asn1js/. Both messages look OK to me, so I guess the culprit 
lies in the encrypted Content itself.

What is the best way to troubleshoot the issue? Is there any logging I can turn 
on?

Kind regards,
Henning

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to