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

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

Issue 1765603002: Add QUIC 31 in which the server's proof covers both the static server config as well as a hash of t… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 9 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
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 <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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 } 111 }
112 certs.push_back(der_encoded_cert); 112 certs.push_back(der_encoded_cert);
113 } 113 }
114 chain_ = new ProofSource::Chain(certs); 114 chain_ = new ProofSource::Chain(certs);
115 return true; 115 return true;
116 } 116 }
117 117
118 bool GetProof(const IPAddress& server_ip, 118 bool GetProof(const IPAddress& server_ip,
119 const std::string& hostname, 119 const std::string& hostname,
120 const std::string& server_config, 120 const std::string& server_config,
121 QuicVersion quic_version,
122 StringPiece chlo_hash,
121 bool ecdsa_ok, 123 bool ecdsa_ok,
122 scoped_refptr<ProofSource::Chain>* out_chain, 124 scoped_refptr<ProofSource::Chain>* out_chain,
123 std::string* out_signature, 125 std::string* out_signature,
124 std::string* out_leaf_cert_sct) override { 126 std::string* out_leaf_cert_sct) override {
125 out_signature->assign(kSignature); 127 out_signature->assign(kSignature);
126 *out_chain = chain_; 128 *out_chain = chain_;
127 *out_leaf_cert_sct = kSCT; 129 *out_leaf_cert_sct = kSCT;
128 return true; 130 return true;
129 } 131 }
130 132
(...skipping 11 matching lines...) Expand all
142 const std::string& cert_file) 144 const std::string& cert_file)
143 : TestProofVerifierChromium(std::move(cert_verifier), 145 : TestProofVerifierChromium(std::move(cert_verifier),
144 std::move(transport_security_state), 146 std::move(transport_security_state),
145 std::move(cert_transparency_verifier), 147 std::move(cert_transparency_verifier),
146 cert_file) {} 148 cert_file) {}
147 ~FakeProofVerifier() override {} 149 ~FakeProofVerifier() override {}
148 150
149 // ProofVerifier interface 151 // ProofVerifier interface
150 QuicAsyncStatus VerifyProof(const std::string& hostname, 152 QuicAsyncStatus VerifyProof(const std::string& hostname,
151 const std::string& server_config, 153 const std::string& server_config,
154 QuicVersion quic_version,
155 StringPiece chlo_hash,
152 const std::vector<std::string>& certs, 156 const std::vector<std::string>& certs,
153 const std::string& cert_sct, 157 const std::string& cert_sct,
154 const std::string& signature, 158 const std::string& signature,
155 const ProofVerifyContext* verify_context, 159 const ProofVerifyContext* verify_context,
156 std::string* error_details, 160 std::string* error_details,
157 scoped_ptr<ProofVerifyDetails>* verify_details, 161 scoped_ptr<ProofVerifyDetails>* verify_details,
158 ProofVerifierCallback* callback) override { 162 ProofVerifierCallback* callback) override {
159 error_details->clear(); 163 error_details->clear();
160 scoped_ptr<ProofVerifyDetailsChromium> verify_details_chromium( 164 scoped_ptr<ProofVerifyDetailsChromium> verify_details_chromium(
161 new ProofVerifyDetailsChromium); 165 new ProofVerifyDetailsChromium);
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 } 271 }
268 272
269 // static 273 // static
270 ProofVerifyContext* CryptoTestUtils::ProofVerifyContextForTesting() { 274 ProofVerifyContext* CryptoTestUtils::ProofVerifyContextForTesting() {
271 return new ProofVerifyContextChromium(/*cert_verify_flags=*/0, BoundNetLog()); 275 return new ProofVerifyContextChromium(/*cert_verify_flags=*/0, BoundNetLog());
272 } 276 }
273 277
274 } // namespace test 278 } // namespace test
275 279
276 } // namespace net 280 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/test_tools/crypto_test_utils.cc ('k') | net/quic/test_tools/quic_stream_factory_peer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698