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/quic_crypto_client_stream.h" | 5 #include "net/quic/quic_crypto_client_stream.h" |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "net/quic/crypto/aes_128_gcm_12_encrypter.h" | 8 #include "net/quic/crypto/aes_128_gcm_12_encrypter.h" |
9 #include "net/quic/crypto/quic_decrypter.h" | 9 #include "net/quic/crypto/quic_decrypter.h" |
10 #include "net/quic/crypto/quic_encrypter.h" | 10 #include "net/quic/crypto/quic_encrypter.h" |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 void InitializeFakeStatelessRejectServer() { | 230 void InitializeFakeStatelessRejectServer() { |
231 TestQuicSpdyServerSession* server_session = nullptr; | 231 TestQuicSpdyServerSession* server_session = nullptr; |
232 CreateServerSessionForTest(server_id_, QuicTime::Delta::FromSeconds(100000), | 232 CreateServerSessionForTest(server_id_, QuicTime::Delta::FromSeconds(100000), |
233 &helper_, &server_crypto_config_, | 233 &helper_, &server_crypto_config_, |
234 &server_connection_, &server_session); | 234 &server_connection_, &server_session); |
235 CHECK(server_session); | 235 CHECK(server_session); |
236 server_session_.reset(server_session); | 236 server_session_.reset(server_session); |
237 CryptoTestUtils::SetupCryptoServerConfigForTest( | 237 CryptoTestUtils::SetupCryptoServerConfigForTest( |
238 server_connection_->clock(), server_connection_->random_generator(), | 238 server_connection_->clock(), server_connection_->random_generator(), |
239 server_session_->config(), &server_crypto_config_); | 239 server_session_->config(), &server_crypto_config_); |
240 server_stream()->set_use_stateless_rejects_if_peer_supported(true); | 240 FLAGS_enable_quic_stateless_reject_support = true; |
241 } | 241 } |
242 | 242 |
243 MockConnectionHelper helper_; | 243 MockConnectionHelper helper_; |
244 | 244 |
245 // Client crypto stream state | 245 // Client crypto stream state |
246 PacketSavingConnection* client_connection_; | 246 PacketSavingConnection* client_connection_; |
247 scoped_ptr<TestQuicSpdyClientSession> client_session_; | 247 scoped_ptr<TestQuicSpdyClientSession> client_session_; |
248 QuicCryptoClientConfig client_crypto_config_; | 248 QuicCryptoClientConfig client_crypto_config_; |
249 | 249 |
250 // Server crypto stream state | 250 // Server crypto stream state |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 server_session_->connection()->random_generator()->RandUint64(); | 285 server_session_->connection()->random_generator()->RandUint64(); |
286 EXPECT_EQ(expected_id, server_designated_id); | 286 EXPECT_EQ(expected_id, server_designated_id); |
287 EXPECT_FALSE(client_state->has_server_designated_connection_id()); | 287 EXPECT_FALSE(client_state->has_server_designated_connection_id()); |
288 } | 288 } |
289 | 289 |
290 #endif | 290 #endif |
291 | 291 |
292 } // namespace | 292 } // namespace |
293 } // namespace test | 293 } // namespace test |
294 } // namespace net | 294 } // namespace net |
OLD | NEW |