Add code count for Trust Anchor IDs to quic::TlsServerConnection::AddCertChain() PiperOrigin-RevId: 863386061
diff --git a/quiche/quic/core/crypto/tls_server_connection.cc b/quiche/quic/core/crypto/tls_server_connection.cc index d6dc35f..4771097 100644 --- a/quiche/quic/core/crypto/tls_server_connection.cc +++ b/quiche/quic/core/crypto/tls_server_connection.cc
@@ -87,11 +87,14 @@ SSL_CREDENTIAL_set_private_key_method( credential.get(), &TlsServerConnection::kPrivateKeyMethod); if (!trust_anchor_id.empty()) { + QUIC_CODE_COUNT(quic_tls_server_connection_trust_anchor_id_present); SSL_CREDENTIAL_set1_trust_anchor_id( credential.get(), reinterpret_cast<const uint8_t*>(trust_anchor_id.data()), trust_anchor_id.size()); SSL_CREDENTIAL_set_must_match_issuer(credential.get(), 1); + } else { + QUIC_CODE_COUNT(quic_tls_server_connection_trust_anchor_id_empty); } SSL_add1_credential(ssl(), credential.get()); }
diff --git a/quiche/quic/core/tls_server_handshaker.cc b/quiche/quic/core/tls_server_handshaker.cc index 59d1c1e..1024b2f 100644 --- a/quiche/quic/core/tls_server_handshaker.cc +++ b/quiche/quic/core/tls_server_handshaker.cc
@@ -1175,8 +1175,11 @@ ProofSource::Chain> absl_nonnull& chain : local_config->chains) { if (!chain->certs.empty()) { + QUIC_CODE_COUNT(quic_tls_server_chain_with_certs_nonempty); tls_connection_.AddCertChain(chain->ToCryptoBuffers().value, chain->trust_anchor_id); + } else { + QUIC_CODE_COUNT(quic_tls_server_chain_with_certs_empty); } } select_cert_status_ = QUIC_SUCCESS;