Yash Dosi
2014-06-05 11:51:09 UTC
Hi All,
I am trying to decrypt emails using openssl.
I am getting smime.p7m file from the server. But it is in DER format.
I can decrypt this file using command prompt, with the command
openssl smime -decrypt -in openssl_working_smime.p7m -inform DER
-inkey mycert.pem > dec_mail.eml
But now I want to do this using C code.
Right now I am trying to do using -
SMIME_read_PKCS7()
But this returns null with
SMIME_read_ASN1:no content type:asn_mime.c:451:
error
Any ideas how to do it?
I am trying to decrypt emails using openssl.
I am getting smime.p7m file from the server. But it is in DER format.
I can decrypt this file using command prompt, with the command
openssl smime -decrypt -in openssl_working_smime.p7m -inform DER
-inkey mycert.pem > dec_mail.eml
But now I want to do this using C code.
Right now I am trying to do using -
SMIME_read_PKCS7()
But this returns null with
SMIME_read_ASN1:no content type:asn_mime.c:451:
error
Any ideas how to do it?