Remove BORINGSSL_API_VERSION checks from quic code These checks are no longer necessary, because BoringSSL in google3 (and chromium) has been updated past https://boringssl-review.googlesource.com/c/boringssl/+/42304 which introduced the need for these checks. PiperOrigin-RevId: 332568497 Change-Id: I385fae31c994b1de943ab60bff6f37d5b9ffd6a1
diff --git a/quic/core/tls_client_handshaker_test.cc b/quic/core/tls_client_handshaker_test.cc index a4bd87e..bc61543 100644 --- a/quic/core/tls_client_handshaker_test.cc +++ b/quic/core/tls_client_handshaker_test.cc
@@ -561,16 +561,11 @@ [kTestAlpn](const std::vector<quiche::QuicheStringPiece>& alpns) { return std::find(alpns.cbegin(), alpns.cend(), kTestAlpn); }); -#if BORINGSSL_API_VERSION > 10 EXPECT_CALL(*server_connection_, CloseConnection(QUIC_HANDSHAKE_FAILED, "TLS handshake failure (ENCRYPTION_INITIAL) 120: " "no application protocol", _)); -#else // BORINGSSL_API_VERSION <= 10 - EXPECT_CALL(*connection_, CloseConnection(QUIC_HANDSHAKE_FAILED, - "Server did not select ALPN", _)); -#endif // BORINGSSL_API_VERSION stream()->CryptoConnect(); crypto_test_utils::AdvanceHandshake(connection_, stream(), 0, @@ -578,13 +573,8 @@ EXPECT_FALSE(stream()->one_rtt_keys_available()); EXPECT_FALSE(server_stream()->one_rtt_keys_available()); -#if BORINGSSL_API_VERSION > 10 EXPECT_FALSE(stream()->encryption_established()); EXPECT_FALSE(server_stream()->encryption_established()); -#else // BORINGSSL_API_VERSION <= 10 - EXPECT_TRUE(stream()->encryption_established()); - EXPECT_TRUE(server_stream()->encryption_established()); -#endif // BORINGSSL_API_VERSION } TEST_P(TlsClientHandshakerTest, ZeroRTTNotAttemptedOnALPNChange) {
diff --git a/quic/core/tls_server_handshaker_test.cc b/quic/core/tls_server_handshaker_test.cc index 8668b6a..2f8f4b8 100644 --- a/quic/core/tls_server_handshaker_test.cc +++ b/quic/core/tls_server_handshaker_test.cc
@@ -307,7 +307,6 @@ const std::string kTestBadClientAlpn = "bad-client-alpn"; EXPECT_CALL(*client_session_, GetAlpnsToOffer()) .WillOnce(Return(std::vector<std::string>({kTestBadClientAlpn}))); -#if BORINGSSL_API_VERSION > 10 EXPECT_CALL(*server_connection_, CloseConnection(QUIC_HANDSHAKE_FAILED, "TLS handshake failure (ENCRYPTION_INITIAL) 120: " @@ -320,23 +319,6 @@ EXPECT_FALSE(client_stream()->encryption_established()); EXPECT_FALSE(server_stream()->one_rtt_keys_available()); EXPECT_FALSE(server_stream()->encryption_established()); -#else // BORINGSSL_API_VERSION <=10 - EXPECT_CALL( - *client_connection_, - CloseConnection(QUIC_HANDSHAKE_FAILED, "Server did not select ALPN", _)); - EXPECT_CALL(*server_connection_, - CloseConnection(QUIC_HANDSHAKE_FAILED, - "Server did not receive a known ALPN", _)); - - // Process two flights of handshake messages. - AdvanceHandshakeWithFakeClient(); - AdvanceHandshakeWithFakeClient(); - - EXPECT_FALSE(client_stream()->one_rtt_keys_available()); - EXPECT_TRUE(client_stream()->encryption_established()); - EXPECT_FALSE(server_stream()->one_rtt_keys_available()); - EXPECT_TRUE(server_stream()->encryption_established()); -#endif // BORINGSSL_API_VERSION } TEST_P(TlsServerHandshakerTest, CustomALPNNegotiation) {