Rename GetAcceptChValueForOrigin() to GetAcceptChValueForHostname().
Also rename argument |origin| to |hostname|. This is all to reflect that
ACCEPT_CH value depends only on hostname, not scheme or port (the other two
components of origin), and argument is the serialization of the hostname, not
the entire origin.
PiperOrigin-RevId: 381527575
diff --git a/quic/core/tls_server_handshaker.cc b/quic/core/tls_server_handshaker.cc
index 3575fa0..65b9c3a 100644
--- a/quic/core/tls_server_handshaker.cc
+++ b/quic/core/tls_server_handshaker.cc
@@ -504,8 +504,8 @@
TlsHandshaker::SetWriteSecret(level, cipher, write_secret);
}
-std::string TlsServerHandshaker::GetAcceptChValueForOrigin(
- const std::string& /*origin*/) const {
+std::string TlsServerHandshaker::GetAcceptChValueForHostname(
+ const std::string& /*hostname*/) const {
return {};
}
@@ -1013,7 +1013,7 @@
const uint8_t* alps_data = nullptr;
const std::string& hostname = crypto_negotiated_params_->sni;
- std::string accept_ch_value = GetAcceptChValueForOrigin(hostname);
+ std::string accept_ch_value = GetAcceptChValueForHostname(hostname);
std::string origin = absl::StrCat("https://", hostname);
if (!accept_ch_value.empty()) {
diff --git a/quic/core/tls_server_handshaker.h b/quic/core/tls_server_handshaker.h
index f1decb7..bec09a1 100644
--- a/quic/core/tls_server_handshaker.h
+++ b/quic/core/tls_server_handshaker.h
@@ -82,10 +82,10 @@
const SSL_CIPHER* cipher,
const std::vector<uint8_t>& write_secret) override;
- // Called with normalized SNI hostname as |origin|. Return value will be sent
- // in an ACCEPT_CH frame in the TLS ALPS extension, unless empty.
- virtual std::string GetAcceptChValueForOrigin(
- const std::string& origin) const;
+ // Called with normalized SNI hostname as |hostname|. Return value will be
+ // sent in an ACCEPT_CH frame in the TLS ALPS extension, unless empty.
+ virtual std::string GetAcceptChValueForHostname(
+ const std::string& hostname) const;
protected:
// Creates a proof source handle for selecting cert and computing signature.