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

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

Issue 320663002: Change the prototype of ChannelIDSource::GetChannelIDKey() to allow an (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Remove unrelated changes Created 6 years, 6 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/crypto_test_utils_nss.cc » ('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/crypto/channel_id.h" 7 #include "net/quic/crypto/channel_id.h"
8 #include "net/quic/crypto/common_cert_set.h" 8 #include "net/quic/crypto/common_cert_set.h"
9 #include "net/quic/crypto/crypto_handshake.h" 9 #include "net/quic/crypto/crypto_handshake.h"
10 #include "net/quic/crypto/quic_crypto_server_config.h" 10 #include "net/quic/crypto/quic_crypto_server_config.h"
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 185
186 CHECK(client.CryptoConnect()); 186 CHECK(client.CryptoConnect());
187 CHECK_EQ(1u, client_conn->packets_.size()); 187 CHECK_EQ(1u, client_conn->packets_.size());
188 188
189 CommunicateHandshakeMessages(client_conn, &client, server_conn, server); 189 CommunicateHandshakeMessages(client_conn, &client, server_conn, server);
190 190
191 CompareClientAndServerKeys(&client, server); 191 CompareClientAndServerKeys(&client, server);
192 192
193 if (options.channel_id_enabled) { 193 if (options.channel_id_enabled) {
194 scoped_ptr<ChannelIDKey> channel_id_key; 194 scoped_ptr<ChannelIDKey> channel_id_key;
195 EXPECT_TRUE(crypto_config.channel_id_source()->GetChannelIDKey( 195 QuicAsyncStatus status =
196 kServerHostname, &channel_id_key)); 196 crypto_config.channel_id_source()->GetChannelIDKey(kServerHostname,
197 &channel_id_key,
198 NULL);
199 EXPECT_EQ(QUIC_SUCCESS, status);
197 EXPECT_EQ(channel_id_key->SerializeKey(), 200 EXPECT_EQ(channel_id_key->SerializeKey(),
198 server->crypto_negotiated_params().channel_id); 201 server->crypto_negotiated_params().channel_id);
199 } 202 }
200 203
201 return client.num_sent_client_hellos(); 204 return client.num_sent_client_hellos();
202 } 205 }
203 206
204 // static 207 // static
205 void CryptoTestUtils::SetupCryptoServerConfigForTest( 208 void CryptoTestUtils::SetupCryptoServerConfigForTest(
206 const QuicClock* clock, 209 const QuicClock* clock,
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 scoped_ptr<QuicData> bytes(CryptoFramer::ConstructHandshakeMessage(msg)); 521 scoped_ptr<QuicData> bytes(CryptoFramer::ConstructHandshakeMessage(msg));
519 scoped_ptr<CryptoHandshakeMessage> parsed( 522 scoped_ptr<CryptoHandshakeMessage> parsed(
520 CryptoFramer::ParseMessage(bytes->AsStringPiece())); 523 CryptoFramer::ParseMessage(bytes->AsStringPiece()));
521 CHECK(parsed.get()); 524 CHECK(parsed.get());
522 525
523 return *parsed; 526 return *parsed;
524 } 527 }
525 528
526 } // namespace test 529 } // namespace test
527 } // namespace net 530 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/test_tools/crypto_test_utils.h ('k') | net/quic/test_tools/crypto_test_utils_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698