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/11/13 19:12:07 UTC
Re: Review Request 71664: SSL Wrapper: Implemented BIO for SSL socket
wrapper.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71664/#review218608
-----------------------------------------------------------
Notes from an offline review session:
3rdparty/libprocess/src/ssl/socket_wrapper.cpp
Lines 213-221 (patched)
<https://reviews.apache.org/r/71664/#comment306399>
Since this is a blocking call, consider not implementing it.
In tests, `BIO_flush` seems to be used in the handshake code within OpenSSL. Since we already have retry logic waiting on these futures asynchronously, a flush would negatively affect the thread, with no real benefit.
3rdparty/libprocess/src/ssl/socket_wrapper.cpp
Lines 254-275 (patched)
<https://reviews.apache.org/r/71664/#comment306415>
An alternative implementation would involve this set of methods:
https://www.openssl.org/docs/man1.1.1/man3/BIO_f_ssl.html
This patch chain transforms the libprocess I/O into a BIO-flavoured object consumable by OpenSSL as a source/sink.
A `BIO_f_ssl` would give us a different interface, where the OpenSSL library is a filter object used by libprocess instead.
- Joseph Wu
On Oct. 30, 2019, 6:29 p.m., Joseph Wu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71664/
> -----------------------------------------------------------
>
> (Updated Oct. 30, 2019, 6:29 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/2/
>
>
> Testing
> -------
>
> cmake --build . --target process
>
> A tiny bit of testing next patch.
>
>
> Thanks,
>
> Joseph Wu
>
>