2014-09-08 18:19 GMT+02:00 Iñaki Baz Castillo <i...@aliax.net>:
> This works fine:
>
> -----------------------------------
> long read;
> // myBuffer is an already allocated buffer.
> char** data = (char**)&myBuffer;
>
> read = BIO_get_mem_data(bio, data);
>
> // Use data and read values.
>
> BIO_reset(bio);
> -----------------------------------

BTW I've realized that it also works by removing the BIO_reset() call.
I assume that SSL_write() writes into the BIO and overrides the
existing data (and the BIO buffer length gets updated with the most
recent written data).


-- 
Iñaki Baz Castillo
<i...@aliax.net>
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to