mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joseph Wu <jos...@mesosphere.io>
Subject Re: Review Request 71664: SSL Wrapper: Implemented BIO for SSL socket wrapper.
Date Tue, 10 Dec 2019 21:59:58 GMT


> On Nov. 26, 2019, 11:38 a.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>
> >
> >     Are we sure that there are no ill effects of immediately returning 1 here, even
when there may still be data left to be flushed?

Looking through the BIO implementations within OpenSSL itself, there are a couple which implement
the "default" return value for this method:
https://github.com/openssl/openssl/blob/f059e4cc435b7b850cfc8188d265a8925edff0bd/crypto/bio/bss_sock.c#L185
https://github.com/openssl/openssl/blob/e7fb44e7c3f7a37ff83a6b69ba51a738e549bf5c/crypto/bio/bss_mem.c#L314
https://github.com/openssl/openssl/blob/e7fb44e7c3f7a37ff83a6b69ba51a738e549bf5c/crypto/bio/bss_null.c#L61

Also, the header seems to imply the method is optional:
https://github.com/openssl/openssl/blob/54a0d4ceb28d53f5b00a27fc5ca8ff8f0ddf9036/include/openssl/bio.h#L87
```
# define BIO_CTRL_FLUSH 11/* opt - 'flush' buffered output */
```


- Joseph


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


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
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message