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 <[email protected]>:

> 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?
>

Reply via email to