2014-09-08 18:19 GMT+02:00 Iñaki Baz Castillo <[email protected]>:
> 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
<[email protected]>
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [email protected]
Automated List Manager                           [email protected]

Reply via email to