In message CALiegfmvaG-nc=putyxey20otoiow6op+lajohnoqxf86aw...@mail.gmail.com
on Mon, 8 Sep 2014 18:19:09 +0200, Iñaki Baz Castillo i...@aliax.net said:
ibc Why do I need to provide BIO_get_mem_data() with an already allocated
ibc buffer? I've checked the function and I do not understand what it
And of course, I noticed this email after sending my own... sorry.
In message CALiegf=BytJ-1ZDzcCw3=e2=6moritr87pjunro4cxorysy...@mail.gmail.com
on Mon, 8 Sep 2014 18:41:40 +0200, Iñaki Baz Castillo i...@aliax.net said:
ibc 2014-09-08 18:35 GMT+02:00 Kyle Hamilton aerow...@gmail.com:
ibc The
2014-09-09 10:46 GMT+02:00 Richard Levitte rich...@levitte.org:
And of course, I noticed this email after sending my own... sorry.
:)
Thanks a lot.
--
Iñaki Baz Castillo
i...@aliax.net
__
OpenSSL Project
Hi, I'm trying to avoid a BIO_read() call given that it copies the BIO
buffer data into a buffer I must provide to the function. I use a BIO
memory pair.
In my case it would be nice if I can get the pointer and length of the
current BIO buffer and then tell the BIO to empty/clean it.
So I want
2014-09-08 14:44 GMT+02:00 Iñaki Baz Castillo i...@aliax.net:
--
int read = BIO_read(sslBioToNetwork, (void*)myBuffer, MY_BUFFER_SIZE);
// Use the read data
--
with something like this:
---
In message CALiegf=+4vr1GU=mn4r0hng99orugtvez+xxjogpbkzx-uz...@mail.gmail.com
on Mon, 8 Sep 2014 15:10:04 +0200, Iñaki Baz Castillo i...@aliax.net said:
ibc 2014-09-08 14:44 GMT+02:00 Iñaki Baz Castillo i...@aliax.net:
ibc --
ibc int read =
2014-09-08 16:08 GMT+02:00 Richard Levitte rich...@levitte.org:
Sorry, BIO_flush() isn't what you want (it doesn't reset the buffer to
empty), BIO_reset() is.
However, you need to be careful... if I were you, I would use the
read data before resetting, as BIO_get_mem_data() gives you the
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);
The allocated buffer needs to be sizeof(char *). What's happening is the
address of the buffer (buffer[0]) gets written to the
pointer-to-pointer-to-char, data. If data == NULL, you're asking to write the
address of the buffer to unallocated memory.
It's done this way because the return value
2014-09-08 18:35 GMT+02:00 Kyle Hamilton aerow...@gmail.com:
The allocated buffer needs to be sizeof(char *). What's happening is the
address of the buffer (buffer[0]) gets written to the
pointer-to-pointer-to-char, data. If data == NULL, you're asking to write
the address of the buffer to
10 matches
Mail list logo