| OLD | NEW |
| 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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 } | 236 } |
| 237 crypto_config.SetChannelIDSource(source); | 237 crypto_config.SetChannelIDSource(source); |
| 238 } | 238 } |
| 239 QuicServerId server_id(kServerHostname, kServerPort, is_https, | 239 QuicServerId server_id(kServerHostname, kServerPort, is_https, |
| 240 PRIVACY_MODE_DISABLED); | 240 PRIVACY_MODE_DISABLED); |
| 241 QuicCryptoClientStream client(server_id, &client_session, | 241 QuicCryptoClientStream client(server_id, &client_session, |
| 242 ProofVerifyContextForTesting(), | 242 ProofVerifyContextForTesting(), |
| 243 &crypto_config); | 243 &crypto_config); |
| 244 client_session.SetCryptoStream(&client); | 244 client_session.SetCryptoStream(&client); |
| 245 | 245 |
| 246 CHECK(client.CryptoConnect()); | 246 client.CryptoConnect(); |
| 247 CHECK_EQ(1u, client_conn->packets_.size()); | 247 CHECK_EQ(1u, client_conn->packets_.size()); |
| 248 | 248 |
| 249 CommunicateHandshakeMessagesAndRunCallbacks( | 249 CommunicateHandshakeMessagesAndRunCallbacks( |
| 250 client_conn, &client, server_conn, server, async_channel_id_source); | 250 client_conn, &client, server_conn, server, async_channel_id_source); |
| 251 | 251 |
| 252 CompareClientAndServerKeys(&client, server); | 252 CompareClientAndServerKeys(&client, server); |
| 253 | 253 |
| 254 if (options.channel_id_enabled) { | 254 if (options.channel_id_enabled) { |
| 255 scoped_ptr<ChannelIDKey> channel_id_key; | 255 scoped_ptr<ChannelIDKey> channel_id_key; |
| 256 QuicAsyncStatus status = crypto_config.channel_id_source()->GetChannelIDKey( | 256 QuicAsyncStatus status = crypto_config.channel_id_source()->GetChannelIDKey( |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 624 scoped_ptr<QuicData> bytes(CryptoFramer::ConstructHandshakeMessage(msg)); | 624 scoped_ptr<QuicData> bytes(CryptoFramer::ConstructHandshakeMessage(msg)); |
| 625 scoped_ptr<CryptoHandshakeMessage> parsed( | 625 scoped_ptr<CryptoHandshakeMessage> parsed( |
| 626 CryptoFramer::ParseMessage(bytes->AsStringPiece())); | 626 CryptoFramer::ParseMessage(bytes->AsStringPiece())); |
| 627 CHECK(parsed.get()); | 627 CHECK(parsed.get()); |
| 628 | 628 |
| 629 return *parsed; | 629 return *parsed; |
| 630 } | 630 } |
| 631 | 631 |
| 632 } // namespace test | 632 } // namespace test |
| 633 } // namespace net | 633 } // namespace net |
| OLD | NEW |