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 "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/net_errors.h" | 9 #include "net/base/net_errors.h" |
10 #include "net/base/test_data_directory.h" | 10 #include "net/base/test_data_directory.h" |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 | 113 |
114 // static | 114 // static |
115 ProofSource* CryptoTestUtils::ProofSourceForTesting() { | 115 ProofSource* CryptoTestUtils::ProofSourceForTesting() { |
116 // TODO(wtc): delete USE_OPENSSL when Chromium has a working | 116 // TODO(wtc): delete USE_OPENSSL when Chromium has a working |
117 // ProofSourceForTesting() for NSS. | 117 // ProofSourceForTesting() for NSS. |
118 // TODO(rch): Implement a NSS proof source. | 118 // TODO(rch): Implement a NSS proof source. |
119 #if defined(USE_OPENSSL) | 119 #if defined(USE_OPENSSL) |
120 ProofSourceChromium* source = new ProofSourceChromium(); | 120 ProofSourceChromium* source = new ProofSourceChromium(); |
121 base::FilePath certs_dir = GetTestCertsDirectory(); | 121 base::FilePath certs_dir = GetTestCertsDirectory(); |
122 CHECK(source->Initialize( | 122 CHECK(source->Initialize( |
123 certs_dir.AppendASCII("quic_chain.crt"), | 123 certs_dir.AppendASCII("quic_test.example.com.crt"), |
124 certs_dir.AppendASCII("quic_test.example.com.key.pkcs8"))); | 124 certs_dir.AppendASCII("quic_test.example.com.key.pkcs8"))); |
125 return source; | 125 return source; |
126 #else | 126 #else |
127 return FakeProofSourceForTesting(); | 127 return FakeProofSourceForTesting(); |
128 #endif | 128 #endif |
129 } | 129 } |
130 | 130 |
131 // static | 131 // static |
132 ProofVerifier* CryptoTestUtils::ProofVerifierForTesting() { | 132 ProofVerifier* CryptoTestUtils::ProofVerifierForTesting() { |
133 // TODO(rch): use a real cert verifier? | 133 // TODO(rch): use a real cert verifier? |
(...skipping 28 matching lines...) Expand all Loading... |
162 } | 162 } |
163 | 163 |
164 // static | 164 // static |
165 ProofVerifyContext* CryptoTestUtils::FakeProofVerifyContextForTesting() { | 165 ProofVerifyContext* CryptoTestUtils::FakeProofVerifyContextForTesting() { |
166 return nullptr; | 166 return nullptr; |
167 } | 167 } |
168 | 168 |
169 } // namespace test | 169 } // namespace test |
170 | 170 |
171 } // namespace net | 171 } // namespace net |
OLD | NEW |