gfe-relnote: (n/a) Wrap all access to FLAGS_quic_supports_tls_handshake with GetQuicFlag and SetQuicFlag. Code only needed for Envoy integration, no behavior change.
PiperOrigin-RevId: 246154160
Change-Id: I5745cb41a7b25ffebd95ea0636d69b7533a0ba87
diff --git a/quic/core/quic_versions.cc b/quic/core/quic_versions.cc
index 92232ba..a5f1f41 100644
--- a/quic/core/quic_versions.cc
+++ b/quic/core/quic_versions.cc
@@ -32,7 +32,7 @@
: handshake_protocol(handshake_protocol),
transport_version(transport_version) {
if (handshake_protocol == PROTOCOL_TLS1_3 &&
- !FLAGS_quic_supports_tls_handshake) {
+ !GetQuicFlag(FLAGS_quic_supports_tls_handshake)) {
QUIC_BUG << "TLS use attempted when not enabled";
}
}
@@ -104,7 +104,7 @@
ParsedQuicVersion ParseQuicVersionLabel(QuicVersionLabel version_label) {
std::vector<HandshakeProtocol> protocols = {PROTOCOL_QUIC_CRYPTO};
- if (FLAGS_quic_supports_tls_handshake) {
+ if (GetQuicFlag(FLAGS_quic_supports_tls_handshake)) {
protocols.push_back(PROTOCOL_TLS1_3);
}
for (QuicTransportVersion version : kSupportedTransportVersions) {
@@ -134,7 +134,7 @@
}
std::vector<HandshakeProtocol> protocols = {PROTOCOL_QUIC_CRYPTO};
- if (FLAGS_quic_supports_tls_handshake) {
+ if (GetQuicFlag(FLAGS_quic_supports_tls_handshake)) {
protocols.push_back(PROTOCOL_TLS1_3);
}
for (QuicTransportVersion version : kSupportedTransportVersions) {
@@ -147,7 +147,8 @@
}
}
// Still recognize T099 even if flag quic_ietf_draft_version has been changed.
- if (FLAGS_quic_supports_tls_handshake && version_string == "T099") {
+ if (GetQuicFlag(FLAGS_quic_supports_tls_handshake) &&
+ version_string == "T099") {
return ParsedQuicVersion(PROTOCOL_TLS1_3, QUIC_VERSION_99);
}
// Reading from the client so this should not be considered an ERROR.
@@ -167,7 +168,8 @@
ParsedQuicVersionVector AllSupportedVersions() {
ParsedQuicVersionVector supported_versions;
for (HandshakeProtocol protocol : kSupportedHandshakeProtocols) {
- if (protocol == PROTOCOL_TLS1_3 && !FLAGS_quic_supports_tls_handshake) {
+ if (protocol == PROTOCOL_TLS1_3 &&
+ !GetQuicFlag(FLAGS_quic_supports_tls_handshake)) {
continue;
}
for (QuicTransportVersion version : kSupportedTransportVersions) {