On Sat, Dec 18, 2010, Allon wrote: > > >> You're looking for a BIO_s_mem. > > >No, he is looking for BIO_new_bio_pair(3) and SSL_set_bio(3). > > I have read this thread and others, and it is not clear yet why > BIO_new_bio_pair should be preferred over 2 BIO_s_mem's. Anyone knows the > answer? >
Memory BIOs, as created with BIO_s_mem() have a number of limitations. Their size can grow indefinitely, transfer of data can be inefficient and result in memory fragmentation issues if they are used extensively. Their I/O routines really could do with an overhaul. They are however relatively simple to use. A bio pair has a fixed size and I/O is handled more efficiently. Care has to be taken however that you correctly transfer data from each side of the BIO and retry when necessary. Steve. -- Dr Stephen N. Henson. OpenSSL project core developer. Commercial tech support now available see: http://www.openssl.org ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org