On Thu, Apr 30, 2009 at 04:05:49PM -0700, Nate Leon wrote: > Is there any use for BIO_flush when using BIO_pairs?
No, they don't have anywhere to drain (flush) the data to. > BIO_pair > ------------------ > The <---> WSARecv <---> BIO_write <---> network | internal <---> SSL* <---> > SSL_read > > Wire /Send /read BIO BIO / > write > > > Is BIO_flush ever needed to move data between the network and internal BIO? > Such as: > BIO_write(networkBio, encryptedData, dwDataSize); > BIO_flush(networkBio); When you copy encrypted data from the network into the networkBio, it is already where it needs to be. There is no need to "flush it". This is not similar to a stdio buffer in-front of a kernel socket-pair. The buffers in the network BIO and internal BIO are more like kernel socket buffers than stdio buffers. Only a finite amount of data is stored in memory before further I/O must wait for the buffers to drain, but the buffered data is immediately available to be drained in either direction. -- Viktor. ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org