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

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

Issue 14287009: Land Recent QUIC Changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with Tot Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/test_tools/crypto_test_utils.h ('k') | net/quic/test_tools/quic_test_utils.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 "base/strings/string_piece.h" 7 #include "base/strings/string_piece.h"
8 #include "net/quic/crypto/crypto_handshake.h" 8 #include "net/quic/crypto/crypto_handshake.h"
9 #include "net/quic/crypto/crypto_server_config.h" 9 #include "net/quic/crypto/crypto_server_config.h"
10 #include "net/quic/crypto/quic_decrypter.h" 10 #include "net/quic/crypto/quic_decrypter.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 CHECK(ParseIPLiteralToNumber("192.0.2.33", &ip)); 165 CHECK(ParseIPLiteralToNumber("192.0.2.33", &ip));
166 IPEndPoint addr = IPEndPoint(ip, 1); 166 IPEndPoint addr = IPEndPoint(ip, 1);
167 PacketSavingConnection* client_conn = 167 PacketSavingConnection* client_conn =
168 new PacketSavingConnection(guid, addr, false); 168 new PacketSavingConnection(guid, addr, false);
169 TestSession client_session(client_conn, true); 169 TestSession client_session(client_conn, true);
170 QuicConfig config; 170 QuicConfig config;
171 QuicCryptoClientConfig crypto_config; 171 QuicCryptoClientConfig crypto_config;
172 172
173 config.SetDefaults(); 173 config.SetDefaults();
174 crypto_config.SetDefaults(); 174 crypto_config.SetDefaults();
175 // TODO(rtenneti): Enable testing of ProofVerifier.
176 // crypto_config.SetProofVerifier(ProofVerifierForTesting());
175 QuicCryptoClientStream client("test.example.com", config, &client_session, 177 QuicCryptoClientStream client("test.example.com", config, &client_session,
176 &crypto_config); 178 &crypto_config);
177 179
178 CHECK(client.CryptoConnect()); 180 CHECK(client.CryptoConnect());
179 CHECK_EQ(1u, client_conn->packets_.size()); 181 CHECK_EQ(1u, client_conn->packets_.size());
180 182
181 CommunicateHandshakeMessages(client_conn, &client, server_conn, server); 183 CommunicateHandshakeMessages(client_conn, &client, server_conn, server);
182 184
183 CompareClientAndServerKeys(&client, server); 185 CompareClientAndServerKeys(&client, server);
184 186
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 client_decrypter_key.data(), 249 client_decrypter_key.data(),
248 client_decrypter_key.length()); 250 client_decrypter_key.length());
249 CompareCharArraysWithHexError("server write IV", 251 CompareCharArraysWithHexError("server write IV",
250 server_encrypter_iv.data(), 252 server_encrypter_iv.data(),
251 server_encrypter_iv.length(), 253 server_encrypter_iv.length(),
252 client_decrypter_iv.data(), 254 client_decrypter_iv.data(),
253 client_decrypter_iv.length()); 255 client_decrypter_iv.length());
254 } 256 }
255 } // namespace test 257 } // namespace test
256 } // namespace net 258 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/test_tools/crypto_test_utils.h ('k') | net/quic/test_tools/quic_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698