Add port field to ProofVerifier::VerifyCertChain
The port field is needed in VerifyCertChain for the chromium ProofVerifier
so it can call CheckCTrequirements for crbug.com/1090838.
Client-only quic change, not flag protected
PiperOrigin-RevId: 315003335
Change-Id: I789540fa20a48ec2f1b0dee47079071ed9e43221
diff --git a/quic/core/tls_handshaker_test.cc b/quic/core/tls_handshaker_test.cc
index 1bd9fae..5a2bd64 100644
--- a/quic/core/tls_handshaker_test.cc
+++ b/quic/core/tls_handshaker_test.cc
@@ -54,6 +54,7 @@
QuicAsyncStatus VerifyCertChain(
const std::string& hostname,
+ const uint16_t port,
const std::vector<std::string>& certs,
const std::string& ocsp_response,
const std::string& cert_sct,
@@ -62,12 +63,12 @@
std::unique_ptr<ProofVerifyDetails>* details,
std::unique_ptr<ProofVerifierCallback> callback) override {
if (!active_) {
- return verifier_->VerifyCertChain(hostname, certs, ocsp_response,
+ return verifier_->VerifyCertChain(hostname, port, certs, ocsp_response,
cert_sct, context, error_details,
details, std::move(callback));
}
pending_ops_.push_back(std::make_unique<VerifyChainPendingOp>(
- hostname, certs, ocsp_response, cert_sct, context, error_details,
+ hostname, port, certs, ocsp_response, cert_sct, context, error_details,
details, std::move(callback), verifier_.get()));
return QUIC_PENDING;
}
@@ -102,6 +103,7 @@
class VerifyChainPendingOp {
public:
VerifyChainPendingOp(const std::string& hostname,
+ const uint16_t port,
const std::vector<std::string>& certs,
const std::string& ocsp_response,
const std::string& cert_sct,
@@ -111,6 +113,7 @@
std::unique_ptr<ProofVerifierCallback> callback,
ProofVerifier* delegate)
: hostname_(hostname),
+ port_(port),
certs_(certs),
ocsp_response_(ocsp_response),
cert_sct_(cert_sct),
@@ -126,7 +129,7 @@
// runs the original callback after asserting that the verification ran
// synchronously.
QuicAsyncStatus status = delegate_->VerifyCertChain(
- hostname_, certs_, ocsp_response_, cert_sct_, context_,
+ hostname_, port_, certs_, ocsp_response_, cert_sct_, context_,
error_details_, details_,
std::make_unique<FailingProofVerifierCallback>());
ASSERT_NE(status, QUIC_PENDING);
@@ -135,6 +138,7 @@
private:
std::string hostname_;
+ const uint16_t port_;
std::vector<std::string> certs_;
std::string ocsp_response_;
std::string cert_sct_;