No public description PiperOrigin-RevId: 877432923
diff --git a/quiche/quic/core/crypto/proof_source.h b/quiche/quic/core/crypto/proof_source.h index 6391ae2..b66a18b 100644 --- a/quiche/quic/core/crypto/proof_source.h +++ b/quiche/quic/core/crypto/proof_source.h
@@ -370,6 +370,9 @@ // Get the TLS ciphersuite negotiated during the handshake, or nullopt if the // handshake has not selected one yet. virtual std::optional<uint16_t> GetCiphersuite() const = 0; + + // Get the ID of the NamedGroup negotiated during the handshake. + virtual uint16_t GetNegotiatedCurve() const = 0; }; // ProofSourceHandle is an interface by which a TlsServerHandshaker can obtain
diff --git a/quiche/quic/core/tls_server_handshaker.cc b/quiche/quic/core/tls_server_handshaker.cc index 3336648..a0fa3c8 100644 --- a/quiche/quic/core/tls_server_handshaker.cc +++ b/quiche/quic/core/tls_server_handshaker.cc
@@ -1250,6 +1250,10 @@ return SSL_CIPHER_get_protocol_id(cipher); } +uint16_t TlsServerHandshaker::GetNegotiatedCurve() const { + return SSL_get_group_id(ssl()); +} + bool TlsServerHandshaker::ValidateHostname(const std::string& hostname) const { if (!QuicHostnameUtils::IsValidSNI(hostname)) { // TODO(b/151676147): Include this error string in the CONNECTION_CLOSE
diff --git a/quiche/quic/core/tls_server_handshaker.h b/quiche/quic/core/tls_server_handshaker.h index dccf620..cf36829 100644 --- a/quiche/quic/core/tls_server_handshaker.h +++ b/quiche/quic/core/tls_server_handshaker.h
@@ -222,6 +222,8 @@ std::optional<uint16_t> GetCiphersuite() const override; + uint16_t GetNegotiatedCurve() const override; + void SetIgnoreTicketOpen(bool value) { ignore_ticket_open_ = value; } const SSL_CIPHER* GetCipher() const override {