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

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

Issue 2463093003: Landing Recent QUIC changes until Sat Oct 29 14:59:35. (Closed)
Patch Set: add change to quiartc_session_test.cc Created 4 years, 1 month 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/test_tools/crypto_test_utils.cc ('k') | net/quic/test_tools/fake_proof_source.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "net/quic/core/crypto/crypto_server_config_protobuf.h" 7 #include "net/quic/core/crypto/crypto_server_config_protobuf.h"
8 #include "net/quic/core/quic_utils.h" 8 #include "net/quic/core/quic_utils.h"
9 #include "net/quic/test_tools/mock_clock.h" 9 #include "net/quic/test_tools/mock_clock.h"
10 #include "net/test/gtest_util.h" 10 #include "net/test/gtest_util.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 } 65 }
66 66
67 class ProcessClientHelloCallback : public ProcessClientHelloResultCallback { 67 class ProcessClientHelloCallback : public ProcessClientHelloResultCallback {
68 public: 68 public:
69 explicit ProcessClientHelloCallback(ShloVerifier* shlo_verifier) 69 explicit ProcessClientHelloCallback(ShloVerifier* shlo_verifier)
70 : shlo_verifier_(shlo_verifier) {} 70 : shlo_verifier_(shlo_verifier) {}
71 void Run( 71 void Run(
72 QuicErrorCode error, 72 QuicErrorCode error,
73 const string& error_details, 73 const string& error_details,
74 std::unique_ptr<CryptoHandshakeMessage> message, 74 std::unique_ptr<CryptoHandshakeMessage> message,
75 std::unique_ptr<DiversificationNonce> diversification_nonce) override { 75 std::unique_ptr<DiversificationNonce> diversification_nonce,
76 std::unique_ptr<ProofSource::Details> proof_source_details) override {
76 shlo_verifier_->ProcessClientHelloDone(std::move(message)); 77 shlo_verifier_->ProcessClientHelloDone(std::move(message));
77 } 78 }
78 79
79 private: 80 private:
80 ShloVerifier* shlo_verifier_; 81 ShloVerifier* shlo_verifier_;
81 }; 82 };
82 83
83 std::unique_ptr<ProcessClientHelloCallback> GetProcessClientHelloCallback() { 84 std::unique_ptr<ProcessClientHelloCallback> GetProcessClientHelloCallback() {
84 return std::unique_ptr<ProcessClientHelloCallback>( 85 return std::unique_ptr<ProcessClientHelloCallback>(
85 new ProcessClientHelloCallback(this)); 86 new ProcessClientHelloCallback(this));
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 // Verify that full_chlo can pass crypto_config's verification. 162 // Verify that full_chlo can pass crypto_config's verification.
162 ShloVerifier shlo_verifier(&crypto_config, server_ip, client_addr, &clock, 163 ShloVerifier shlo_verifier(&crypto_config, server_ip, client_addr, &clock,
163 proof, &compressed_certs_cache); 164 proof, &compressed_certs_cache);
164 crypto_config.ValidateClientHello( 165 crypto_config.ValidateClientHello(
165 full_chlo, client_addr.address(), server_ip, version, &clock, proof, 166 full_chlo, client_addr.address(), server_ip, version, &clock, proof,
166 shlo_verifier.GetValidateClientHelloCallback()); 167 shlo_verifier.GetValidateClientHelloCallback());
167 } 168 }
168 169
169 } // namespace test 170 } // namespace test
170 } // namespace net 171 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/test_tools/crypto_test_utils.cc ('k') | net/quic/test_tools/fake_proof_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698