Skip to content

Commit c059d3d

Browse files
nornagonaddaleax
authored andcommitted
tls: enable renegotiation when using BoringSSL
PR-URL: #34832 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Shelley Vohr <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent da150f4 commit c059d3d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/tls_wrap.cc

+6
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,12 @@ void TLSWrap::InitSSL() {
128128
// - https://wiki.openssl.org/index.php/TLS1.3#Non-application_data_records
129129
SSL_set_mode(ssl_.get(), SSL_MODE_AUTO_RETRY);
130130

131+
#ifdef OPENSSL_IS_BORINGSSL
132+
// OpenSSL allows renegotiation by default, but BoringSSL disables it.
133+
// Configure BoringSSL to match OpenSSL's behavior.
134+
SSL_set_renegotiate_mode(ssl_.get(), ssl_renegotiate_freely);
135+
#endif
136+
131137
SSL_set_app_data(ssl_.get(), this);
132138
// Using InfoCallback isn't how we are supposed to check handshake progress:
133139
// https://github.com/openssl/openssl/issues/7199#issuecomment-420915993

0 commit comments

Comments
 (0)