Skip to content

Commit d68b1f6

Browse files
committed
tls: enable renegotiation when using boringssl
1 parent 68ccd16 commit d68b1f6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/tls_wrap.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,12 @@ void TLSWrap::InitSSL() {
131131
// - https://wiki.openssl.org/index.php/TLS1.3#Non-application_data_records
132132
SSL_set_mode(ssl_.get(), SSL_MODE_AUTO_RETRY);
133133

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

0 commit comments

Comments
 (0)