[openssl-users] Custom memory BIO write callback, determine last segment?

Alex H alexhultman at gmail.com
Tue Jul 3 18:16:57 UTC 2018


Hi,

I have a custom BIO_TYPE_MEM BIO with write and read callbacks that map to
a networking socket. I'm getting a lot better performance by using the
MSG_MORE flag of the Linux send syscall to "cork" segments of a stream
together.

So far I have guessed whether to pass MSG_MORE or not based of the size of
the chunk passed to the BIO write callback, but this is no longer viable.

SSL_write with a long buffer will produce roughly 16kb chunks to be sent
off by the BIO - how can I know if a chunk is "in the middle" of an ongoing
SSL_write or if the chunk is last?

I don't see anything that can help me in the BIO ctrl callback, or?

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mta.openssl.org/pipermail/openssl-users/attachments/20180703/00c49e1b/attachment.html>


More information about the openssl-users mailing list