OLD | NEW |
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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 return new TestProofVerifierChromium( | 242 return new TestProofVerifierChromium( |
243 std::move(cert_verifier), make_scoped_ptr(new TransportSecurityState), | 243 std::move(cert_verifier), make_scoped_ptr(new TransportSecurityState), |
244 make_scoped_ptr(new MultiLogCTVerifier), "quic_root.crt"); | 244 make_scoped_ptr(new MultiLogCTVerifier), "quic_root.crt"); |
245 } | 245 } |
246 #if defined(USE_OPENSSL) | 246 #if defined(USE_OPENSSL) |
247 return new TestProofVerifierChromium( | 247 return new TestProofVerifierChromium( |
248 std::move(cert_verifier), make_scoped_ptr(new TransportSecurityState), | 248 std::move(cert_verifier), make_scoped_ptr(new TransportSecurityState), |
249 make_scoped_ptr(new MultiLogCTVerifier), "quic_root.crt"); | 249 make_scoped_ptr(new MultiLogCTVerifier), "quic_root.crt"); |
250 #else | 250 #else |
251 return new FakeProofVerifier( | 251 return new FakeProofVerifier( |
252 cert_verifier.Pass(), make_scoped_ptr(new TransportSecurityState), | 252 std::move(cert_verifier), make_scoped_ptr(new TransportSecurityState), |
253 make_scoped_ptr(new MultiLogCTVerifier), "quic_root.crt"); | 253 make_scoped_ptr(new MultiLogCTVerifier), "quic_root.crt"); |
254 #endif | 254 #endif |
255 } | 255 } |
256 | 256 |
257 // static | 257 // static |
258 ProofVerifier* CryptoTestUtils::ProofVerifierForTesting() { | 258 ProofVerifier* CryptoTestUtils::ProofVerifierForTesting() { |
259 return ProofVerifierForTestingInternal(/*use_real_proof_verifier=*/false); | 259 return ProofVerifierForTestingInternal(/*use_real_proof_verifier=*/false); |
260 } | 260 } |
261 | 261 |
262 // static | 262 // static |
263 ProofVerifier* CryptoTestUtils::RealProofVerifierForTesting() { | 263 ProofVerifier* CryptoTestUtils::RealProofVerifierForTesting() { |
264 return ProofVerifierForTestingInternal(/*use_real_proof_verifier=*/true); | 264 return ProofVerifierForTestingInternal(/*use_real_proof_verifier=*/true); |
265 } | 265 } |
266 | 266 |
267 // static | 267 // static |
268 ProofVerifyContext* CryptoTestUtils::ProofVerifyContextForTesting() { | 268 ProofVerifyContext* CryptoTestUtils::ProofVerifyContextForTesting() { |
269 return new ProofVerifyContextChromium(/*cert_verify_flags=*/0, BoundNetLog()); | 269 return new ProofVerifyContextChromium(/*cert_verify_flags=*/0, BoundNetLog()); |
270 } | 270 } |
271 | 271 |
272 } // namespace test | 272 } // namespace test |
273 | 273 |
274 } // namespace net | 274 } // namespace net |
OLD | NEW |