writev over OpenSSL

Richard Levitte levitte at openssl.org
Sun Feb 2 17:20:56 UTC 2020


So if I understand correctly, the desirable advantages with writev(2)
are atomicity across the set of buffers passed as well as minimum
system call overhead.

I can't see that we have support for this kind of construct.  We
*could* simulate something like that with smartly written BIOs, but
it would be just that, a simulation, and I'm quite sceptical that it
would gain you much more than the mere comfort of having an interface
that you're used to deal with.

Cheers,
Richard

On Sun, 02 Feb 2020 15:27:52 +0100,
Eran Borovik wrote:
> I am in the process of integrating OpenSSL with my application. My application uses scatter-gather unencrypted
> buffers. Without OpenSSL, I would use writev with no issues. Is there a way to do the equivalent over OpenSSL?
> I understand that I can split the vector into multiple SSL_write/SSL_read operations but that defeats the
> purpose and has a large overhead. Creating a temporary buffer and then consolidating the vector is a problem
> because of the performance cost associated with memory copy.
> Is there a clean way to achieve this without the performance overhead. Perhaps dealing with BIOs directly?
> 
> Many thanks,
> Eran
> 
> 
-- 
Richard Levitte         levitte at openssl.org
OpenSSL Project         http://www.openssl.org/~levitte/


More information about the openssl-users mailing list