On Mon, Mar 25, 2013, spammazz wrote:

> Hi all,
> I'm using openssl-1.0.1e library to decrypt an email and the output is
> redirected into a file.
> 
> BIO *bio_plain_text = BIO_new_file("plain_text", "w");
>   
> CMS_decrypt(contentInfo, pkey, mla_cert, NULL, bio_plain_text, 0);
>        
> How can I decypt in a buffer also if I don't know the output size?
> 

You can use a memory BIO and then extract the buffer from that.

See the BIO_s_mem() manual page for more details.

Steve.
--
Dr Stephen N. Henson. OpenSSL project core developer.
Commercial tech support now available see: http://www.openssl.org
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to