Skip to content

Commit

Permalink
Deprecate --quic_check_connected_before_set_read_secret.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 573863710
  • Loading branch information
wu-bin authored and copybara-github committed Oct 16, 2023
1 parent 2f0fa07 commit f0af750
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
2 changes: 0 additions & 2 deletions quiche/quic/core/quic_flags_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ QUIC_FLAG(quic_reloadable_flag_quic_allow_client_enabled_bbr_v2, true)
QUIC_FLAG(quic_restart_flag_quic_opport_bundle_qpack_decoder_data, false)
// If true, an endpoint does not detect path degrading or blackholing until handshake gets confirmed.
QUIC_FLAG(quic_reloadable_flag_quic_no_path_degrading_before_handshake_confirmed, true)
// If true, check connected at the beginning of TlsHandshaker::SetReadSecret.
QUIC_FLAG(quic_reloadable_flag_quic_check_connected_before_set_read_secret, true)
// If true, default-enable 5RTO blachole detection.
QUIC_FLAG(quic_reloadable_flag_quic_default_enable_5rto_blackhole_detection2, true)
// If true, disable QUIC version Q046.
Expand Down
12 changes: 4 additions & 8 deletions quiche/quic/core/tls_handshaker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -290,15 +290,11 @@ bool TlsHandshaker::SetReadSecret(EncryptionLevel level,
absl::Span<const uint8_t> read_secret) {
QUIC_DVLOG(1) << ENDPOINT << "SetReadSecret level=" << level
<< ", connection_closed=" << is_connection_closed();
if (check_connected_before_set_read_secret_) {
if (is_connection_closed()) {
QUIC_RELOADABLE_FLAG_COUNT_N(quic_check_connected_before_set_read_secret,
1, 2);
return false;
}
QUIC_RELOADABLE_FLAG_COUNT_N(quic_check_connected_before_set_read_secret, 2,
2);

if (is_connection_closed()) {
return false;
}

std::unique_ptr<QuicDecrypter> decrypter =
QuicDecrypter::CreateFromCipherSuite(SSL_CIPHER_get_id(cipher));
const EVP_MD* prf = Prf(cipher);
Expand Down
2 changes: 0 additions & 2 deletions quiche/quic/core/tls_handshaker.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,6 @@ class QUICHE_EXPORT TlsHandshaker : public TlsConnection::Delegate,

int expected_ssl_error_ = SSL_ERROR_WANT_READ;
bool is_connection_closed_ = false;
const bool check_connected_before_set_read_secret_ =
GetQuicReloadableFlag(quic_check_connected_before_set_read_secret);

QuicCryptoStream* stream_;
HandshakerDelegateInterface* handshaker_delegate_;
Expand Down

0 comments on commit f0af750

Please sign in to comment.