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

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

Issue 816543004: Update from https://crrev.com/308996 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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.cc ('k') | net/quic/test_tools/quic_connection_peer.h » ('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"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « net/quic/quic_stream_factory.cc ('k') | net/quic/test_tools/quic_connection_peer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698