On Fri, May 01, 2009 at 10:16:27AM -0700, Nate Leon wrote:

> That's what I figured, but then I came across the "WARNING" on the
> BIO_new_bio_pair page:
> http://www.openssl.org/docs/crypto/BIO_new_bio_pair.html
> 
> "As the data is buffered, SSL_operation() may return with a
> ERROR_SSL_WANT_READ condition, but there is still data in the write buffer.
> An application must not rely on the error value of SSL_operation() but must
> assure that the write buffer is always flushed first. Otherwise a deadlock
> may occur as the peer might be waiting for the data before being able to
> continue."
> 
> That made me think that maybe the network BIO and internal BIO each have
> their own buffer, and I needed to flush the data between the network BIO and
> the internal BIO after doing a BIO_write to the network BIO.

The warning is about the need to move pending data between the network
BIO and the peer before waiting for responses from the peer. You do not
need to flush the network bio to make its data available to the internal
bio.

-- 
        Viktor.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to