Make CryptoUtils::HashHandshakeMessage return by value
Also, during the handshake, don't hash the CHLO unless the hash is going to be used.
gfe-relnote: No-op refactoring, no functional change, not flag-protected.
PiperOrigin-RevId: 238635063
Change-Id: I76f033c33f436a1e95db5aae9494dbfdf7139ed5
diff --git a/quic/core/quic_crypto_server_handshaker.cc b/quic/core/quic_crypto_server_handshaker.cc
index c5b1597..cd3cce9 100644
--- a/quic/core/quic_crypto_server_handshaker.cc
+++ b/quic/core/quic_crypto_server_handshaker.cc
@@ -121,8 +121,8 @@
return;
}
- CryptoUtils::HashHandshakeMessage(message, &chlo_hash_,
- Perspective::IS_SERVER);
+ chlo_hash_ =
+ CryptoUtils::HashHandshakeMessage(message, Perspective::IS_SERVER);
std::unique_ptr<ValidateCallback> cb(new ValidateCallback(this));
DCHECK(validate_client_hello_cb_ == nullptr);