You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Joseph Wu <jo...@mesosphere.io> on 2019/12/03 22:39:32 UTC

Re: Review Request 71664: SSL Wrapper: Implemented BIO for SSL socket wrapper.


> On Nov. 26, 2019, 1:59 p.m., Greg Mann wrote:
> > 3rdparty/libprocess/src/ssl/socket_wrapper.cpp
> > Lines 212-215 (patched)
> > <https://reviews.apache.org/r/71664/diff/3/?file=2174350#file2174350line212>
> >
> >     I wonder if openssl's internal calls to `BIO_flush()` will retry if the call fails... perhaps we could synchronously return zero here if there are pending writes, and return 1 if everything has been written?

No.  If this call returns 0 (or anything less than 1), the SSL library will consider this a `SSL_ERROR_SYSCALL` and will refuse to make any further progress, thereby shutting down the socket.  I haven't found any way around this, but I also have not seen any consequences from lying about the flush either.


- Joseph


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71664/#review218804
-----------------------------------------------------------


On Nov. 19, 2019, 12:16 p.m., Joseph Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71664/
> -----------------------------------------------------------
> 
> (Updated Nov. 19, 2019, 12:16 p.m.)
> 
> 
> Review request for mesos, Benno Evers, Benjamin Mahler, Greg Mann, and Till Toenshoff.
> 
> 
> Bugs: MESOS-10009
>     https://issues.apache.org/jira/browse/MESOS-10009
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This implements the OpenSSL basic I/O abstraction based on the
> libprocess event loop.  This BIO wraps a socket and handles the
> reading/writing, using io::read and io::write.
> 
> This BIO can be passed into an SSL context to enable usage of
> SSL translation functions like SSL_read and SSL_write.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/ssl/socket_wrapper.cpp PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/71664/diff/3/
> 
> 
> Testing
> -------
> 
> cmake --build . --target process
> 
> A tiny bit of testing next patch.
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>