Skip to content

Commit

Permalink
tls: remove legacy socket BIOs and runtime guard (envoyproxy#16023)
Browse files Browse the repository at this point in the history
* tls: remove legacy socket BIOs and runtime guard

Signed-off-by: Florin Coras <[email protected]>
Signed-off-by: Gokul Nair <[email protected]>
  • Loading branch information
florincoras authored and Gokul Nair committed May 6, 2021
1 parent e9c24fb commit 1716dec
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
2 changes: 2 additions & 0 deletions docs/root/version_history/current.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Removed Config or Runtime
-------------------------
*Normally occurs at the end of the* :ref:`deprecation period <deprecated>`

* tls: removed `envoy.reloadable_features.tls_use_io_handle_bio` runtime guard and legacy code path.

New Features
------------

Expand Down
1 change: 0 additions & 1 deletion source/common/runtime/runtime_features.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ constexpr const char* runtime_features[] = {
"envoy.reloadable_features.require_strict_1xx_and_204_response_headers",
"envoy.reloadable_features.return_502_for_upstream_protocol_errors",
"envoy.reloadable_features.send_strict_1xx_and_204_response_headers",
"envoy.reloadable_features.tls_use_io_handle_bio",
"envoy.reloadable_features.treat_host_like_authority",
"envoy.reloadable_features.treat_upstream_connect_timeout_as_connect_failure",
"envoy.reloadable_features.upstream_host_weight_change_causes_rebuild",
Expand Down
10 changes: 2 additions & 8 deletions source/extensions/transport_sockets/tls/ssl_socket.cc
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,8 @@ void SslSocket::setTransportSocketCallbacks(Network::TransportSocketCallbacks& c
provider->registerPrivateKeyMethod(rawSsl(), *this, callbacks_->connection().dispatcher());
}

BIO* bio;
if (Runtime::runtimeFeatureEnabled("envoy.reloadable_features.tls_use_io_handle_bio")) {
// Use custom BIO that reads from/writes to IoHandle
bio = BIO_new_io_handle(&callbacks_->ioHandle());
} else {
// TODO(fcoras): remove once the io_handle_bio proves to be stable
bio = BIO_new_socket(callbacks_->ioHandle().fdDoNotUse(), 0);
}
// Use custom BIO that reads from/writes to IoHandle
BIO* bio = BIO_new_io_handle(&callbacks_->ioHandle());
SSL_set_bio(rawSsl(), bio, bio);
}

Expand Down

0 comments on commit 1716dec

Please sign in to comment.