Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(398)

Side by Side Diff: net/quic/test_tools/crypto_test_utils_chromium.cc

Issue 1216943003: Use the CT policy enforcer for QUIC, if specified. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/quic/quic_stream_factory_test.cc ('k') | net/tools/quic/quic_client_bin.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/test_tools/crypto_test_utils.h" 5 #include "net/quic/test_tools/crypto_test_utils.h"
6 6
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "net/base/test_data_directory.h" 9 #include "net/base/test_data_directory.h"
10 #include "net/cert/cert_verifier.h" 10 #include "net/cert/cert_verifier.h"
11 #include "net/cert/test_root_certs.h" 11 #include "net/cert/test_root_certs.h"
12 #include "net/cert/x509_certificate.h" 12 #include "net/cert/x509_certificate.h"
13 #include "net/http/transport_security_state.h" 13 #include "net/http/transport_security_state.h"
14 #include "net/quic/crypto/proof_source_chromium.h" 14 #include "net/quic/crypto/proof_source_chromium.h"
15 #include "net/quic/crypto/proof_verifier_chromium.h" 15 #include "net/quic/crypto/proof_verifier_chromium.h"
16 #include "net/test/cert_test_util.h" 16 #include "net/test/cert_test_util.h"
17 17
18 namespace net { 18 namespace net {
19 19
20 namespace test { 20 namespace test {
21 21
22 namespace { 22 namespace {
23 23
24 class TestProofVerifierChromium : public ProofVerifierChromium { 24 class TestProofVerifierChromium : public ProofVerifierChromium {
25 public: 25 public:
26 TestProofVerifierChromium(CertVerifier* cert_verifier, 26 TestProofVerifierChromium(CertVerifier* cert_verifier,
27 TransportSecurityState* transport_security_state, 27 TransportSecurityState* transport_security_state,
28 const std::string& cert_file) 28 const std::string& cert_file)
29 : ProofVerifierChromium(cert_verifier, transport_security_state), 29 : ProofVerifierChromium(cert_verifier, nullptr, transport_security_state),
30 cert_verifier_(cert_verifier), 30 cert_verifier_(cert_verifier),
31 transport_security_state_(transport_security_state) { 31 transport_security_state_(transport_security_state) {
32 // Load and install the root for the validated chain. 32 // Load and install the root for the validated chain.
33 scoped_refptr<X509Certificate> root_cert = 33 scoped_refptr<X509Certificate> root_cert =
34 ImportCertFromFile(GetTestCertsDirectory(), cert_file); 34 ImportCertFromFile(GetTestCertsDirectory(), cert_file);
35 scoped_root_.Reset(root_cert.get()); 35 scoped_root_.Reset(root_cert.get());
36 } 36 }
37 ~TestProofVerifierChromium() override {} 37 ~TestProofVerifierChromium() override {}
38 38
39 private: 39 private:
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 } 135 }
136 136
137 // static 137 // static
138 ProofVerifyContext* CryptoTestUtils::FakeProofVerifyContextForTesting() { 138 ProofVerifyContext* CryptoTestUtils::FakeProofVerifyContextForTesting() {
139 return nullptr; 139 return nullptr;
140 } 140 }
141 141
142 } // namespace test 142 } // namespace test
143 143
144 } // namespace net 144 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_stream_factory_test.cc ('k') | net/tools/quic/quic_client_bin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698