Re: How to decrypt smime.p7m file in DER format using OpenSSL in C code.

2014-06-05 Thread Vladimir Zatsepin
Hi, To load a DER-encoded PKCS7 structure from the file you have to use d2i_PKCS7_bio() function. 2014-06-05 15:51 GMT+04:00 Yash Dosi : > 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 fi

How to decrypt smime.p7m file in DER format using OpenSSL in C code.

2014-06-05 Thread Yash Dosi
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