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/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" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 | 48 |
49 class FakeProofSource : public ProofSource { | 49 class FakeProofSource : public ProofSource { |
50 public: | 50 public: |
51 FakeProofSource() : certs_(2) { | 51 FakeProofSource() : certs_(2) { |
52 certs_[0] = kLeafCert; | 52 certs_[0] = kLeafCert; |
53 certs_[1] = kIntermediateCert; | 53 certs_[1] = kIntermediateCert; |
54 } | 54 } |
55 ~FakeProofSource() override {} | 55 ~FakeProofSource() override {} |
56 | 56 |
57 // ProofSource interface | 57 // ProofSource interface |
58 bool GetProof(const std::string& hostname, | 58 bool GetProof(const IPEndPoint& server_ip, |
| 59 const std::string& hostname, |
59 const std::string& server_config, | 60 const std::string& server_config, |
60 bool ecdsa_ok, | 61 bool ecdsa_ok, |
61 const std::vector<std::string>** out_certs, | 62 const std::vector<std::string>** out_certs, |
62 std::string* out_signature) override { | 63 std::string* out_signature) override { |
63 *out_certs = &certs_; | 64 *out_certs = &certs_; |
64 *out_signature = kSignature; | 65 *out_signature = kSignature; |
65 return true; | 66 return true; |
66 } | 67 } |
67 | 68 |
68 private: | 69 private: |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 } | 136 } |
136 | 137 |
137 // static | 138 // static |
138 ProofVerifyContext* CryptoTestUtils::FakeProofVerifyContextForTesting() { | 139 ProofVerifyContext* CryptoTestUtils::FakeProofVerifyContextForTesting() { |
139 return nullptr; | 140 return nullptr; |
140 } | 141 } |
141 | 142 |
142 } // namespace test | 143 } // namespace test |
143 | 144 |
144 } // namespace net | 145 } // namespace net |
OLD | NEW |