• caglararli@hotmail.com
  • 05386281520

Incomplete decryption of S/MIME mails using openssl cms

Çağlar Arlı      -    44 Views

Incomplete decryption of S/MIME mails using openssl cms

We're receiving signed and encrypted mails from many senders. For most senders, the decryption with openssl works fine using the following command:

openssl cms -decrypt -recip <path-to-key> -in <path-to-email>

However, for some senders, the output still seems to be an encrypted mail. The output looks like this:

Content-Type: application/pkcs7-mime; smime-type=enveloped-data;
        name=smime.p7m
Content-Disposition: attachment; filename=smime.p7m

MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwGggCSA
<base64 continues>
tyVzAusE29WxvR13wWJaSHn4/ObV6pa0yboAenGZTTXhJVmhAAAAAAAAAA==

If I open the output file in Outlook, it shows the correctly decrypted mail, so I'm confident the certificate, etc. is correct.

Is it possible to use openssl to output the mail to text, so I can process it automatically using tools other than Outlook?