summaryrefslogtreecommitdiffstats
path: root/net/quic/test_tools
diff options
context:
space:
mode:
Diffstat (limited to 'net/quic/test_tools')
-rw-r--r--net/quic/test_tools/crypto_test_utils.cc2
-rw-r--r--net/quic/test_tools/crypto_test_utils.h5
-rw-r--r--net/quic/test_tools/crypto_test_utils_chromium.cc7
-rw-r--r--net/quic/test_tools/mock_crypto_client_stream.cc4
-rw-r--r--net/quic/test_tools/mock_crypto_client_stream.h1
-rw-r--r--net/quic/test_tools/mock_crypto_client_stream_factory.cc2
6 files changed, 17 insertions, 4 deletions
diff --git a/net/quic/test_tools/crypto_test_utils.cc b/net/quic/test_tools/crypto_test_utils.cc
index c3ccf72..f8d65b9 100644
--- a/net/quic/test_tools/crypto_test_utils.cc
+++ b/net/quic/test_tools/crypto_test_utils.cc
@@ -180,7 +180,7 @@ int CryptoTestUtils::HandshakeWithFakeClient(
crypto_config.SetChannelIDSigner(ChannelIDSignerForTesting());
}
QuicSessionKey server_key(kServerHostname, kServerPort, false);
- QuicCryptoClientStream client(server_key, &client_session, NULL,
+ QuicCryptoClientStream client(server_key, &client_session, NULL, NULL,
&crypto_config);
client_session.SetCryptoStream(&client);
diff --git a/net/quic/test_tools/crypto_test_utils.h b/net/quic/test_tools/crypto_test_utils.h
index 65ba9ee..4a38b0e 100644
--- a/net/quic/test_tools/crypto_test_utils.h
+++ b/net/quic/test_tools/crypto_test_utils.h
@@ -23,6 +23,7 @@ class ChannelIDSigner;
class CommonCertSets;
class ProofSource;
class ProofVerifier;
+class ProofVerifyContext;
class QuicClock;
class QuicConfig;
class QuicCryptoClientStream;
@@ -96,6 +97,10 @@ class CryptoTestUtils {
// Returns a |ProofVerifier| that uses the QUIC testing root CA.
static ProofVerifier* ProofVerifierForTesting();
+ // Returns a |ProofVerifyContext| that must be used with the verifier
+ // returned by ||ProofVerifierForTesting.
+ static ProofVerifyContext* ProofVerifyContextForTesting();
+
// MockCommonCertSets returns a CommonCertSets that contains a single set with
// hash |hash|, consisting of the certificate |cert| at index |index|.
static CommonCertSets* MockCommonCertSets(base::StringPiece cert,
diff --git a/net/quic/test_tools/crypto_test_utils_chromium.cc b/net/quic/test_tools/crypto_test_utils_chromium.cc
index 8aaef42..12dadb1 100644
--- a/net/quic/test_tools/crypto_test_utils_chromium.cc
+++ b/net/quic/test_tools/crypto_test_utils_chromium.cc
@@ -22,7 +22,7 @@ class TestProofVerifierChromium : public ProofVerifierChromium {
public:
TestProofVerifierChromium(CertVerifier* cert_verifier,
const std::string& cert_file)
- : ProofVerifierChromium(cert_verifier, BoundNetLog()),
+ : ProofVerifierChromium(cert_verifier),
cert_verifier_(cert_verifier) {
// Load and install the root for the validated chain.
scoped_refptr<X509Certificate> root_cert =
@@ -42,6 +42,11 @@ ProofSource* CryptoTestUtils::ProofSourceForTesting() {
}
// static
+ProofVerifyContext* CryptoTestUtils::ProofVerifyContextForTesting() {
+ return new ProofVerifyContextChromium(BoundNetLog());
+}
+
+// static
ProofVerifier* CryptoTestUtils::ProofVerifierForTesting() {
TestProofVerifierChromium* proof_verifier = new TestProofVerifierChromium(
CertVerifier::CreateDefault(), "quic_root.crt");
diff --git a/net/quic/test_tools/mock_crypto_client_stream.cc b/net/quic/test_tools/mock_crypto_client_stream.cc
index b0112d5..d829fb2 100644
--- a/net/quic/test_tools/mock_crypto_client_stream.cc
+++ b/net/quic/test_tools/mock_crypto_client_stream.cc
@@ -13,10 +13,12 @@ MockCryptoClientStream::MockCryptoClientStream(
const QuicSessionKey& server_key,
QuicSession* session,
QuicCryptoClientStream::Visitor* visitor,
+ ProofVerifyContext* verify_context,
QuicCryptoClientConfig* crypto_config,
HandshakeMode handshake_mode,
const ProofVerifyDetails* proof_verify_details)
- : QuicCryptoClientStream(server_key, session, visitor, crypto_config),
+ : QuicCryptoClientStream(server_key, session, visitor, verify_context,
+ crypto_config),
handshake_mode_(handshake_mode),
proof_verify_details_(proof_verify_details) {
}
diff --git a/net/quic/test_tools/mock_crypto_client_stream.h b/net/quic/test_tools/mock_crypto_client_stream.h
index 444f88d..1bec098 100644
--- a/net/quic/test_tools/mock_crypto_client_stream.h
+++ b/net/quic/test_tools/mock_crypto_client_stream.h
@@ -39,6 +39,7 @@ class MockCryptoClientStream : public QuicCryptoClientStream {
const QuicSessionKey& server_key,
QuicSession* session,
QuicCryptoClientStream::Visitor* visitor,
+ ProofVerifyContext* verify_context,
QuicCryptoClientConfig* crypto_config,
HandshakeMode handshake_mode,
const ProofVerifyDetails* proof_verify_details_);
diff --git a/net/quic/test_tools/mock_crypto_client_stream_factory.cc b/net/quic/test_tools/mock_crypto_client_stream_factory.cc
index 686fd56..d9ebcaf 100644
--- a/net/quic/test_tools/mock_crypto_client_stream_factory.cc
+++ b/net/quic/test_tools/mock_crypto_client_stream_factory.cc
@@ -25,7 +25,7 @@ MockCryptoClientStreamFactory::CreateQuicCryptoClientStream(
QuicClientSession* session,
QuicCryptoClientConfig* crypto_config) {
last_stream_ = new MockCryptoClientStream(
- server_key, session, session, crypto_config, handshake_mode_,
+ server_key, session, session, NULL, crypto_config, handshake_mode_,
proof_verify_details_);
return last_stream_;
}