Hi Steve,

On Mon, Oct 5, 2009 at 5:11 PM, Dr. Stephen Henson <st...@openssl.org>wrote:

> [snipped]
>
> Does this simpler version help:
>
> http://www.openssl.org/support/faq.html#PROG15
>

Thank you for pointing me to this. I understand it better now. However the
problem is still unresolved.

>From the FAQ I understand that if I were to do BIO_set_mem_eof_return(bio,
0), then the behavior should be similar to a file bio and my code to read
decoded data should work. But it doesn't.

Here is the code: http://pastebin.ca/1594435

To verify that it is the eof behavior that is causing this problem I tried
reading directly from the memory bio without making this call :
BIO_set_mem_eof_return(bio, 0).  I could successfully read the base64 data
present in the mem bio and in the next call to read all the parameters were
appropriately set to indicate that I should stop reading, namely:

1) BIO_read returned -1
2)One of the two flags,  should_retry or should_read, was false

So if reading directly from the memory bio works fine, why doesn't it work
in a chain with a base64 bio? Is it the case that the base64 bio expects its
source bio to be in some particular state or to be of a particular type? If
so, what are those particular properties?

-- 
Regards,
Brahmana.

The LIGHT shows the way.
The WISE see it.
The BRAVE walk it.
The PERSISTENT endure and complete it.

I want to do it all ALONE.

Reply via email to