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

Side by Side Diff: net/quic/quic_crypto_server_stream_test.cc

Issue 1309813003: Implement an openssl version of a QUIC ProofSource. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comments Created 5 years, 4 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
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/quic_crypto_server_stream.h" 5 #include "net/quic/quic_crypto_server_stream.h"
6 6
7 #include <map> 7 #include <map>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 const char kServerHostname[] = "test.example.com"; 63 const char kServerHostname[] = "test.example.com";
64 const uint16 kServerPort = 80; 64 const uint16 kServerPort = 80;
65 65
66 class QuicCryptoServerStreamTest : public ::testing::TestWithParam<bool> { 66 class QuicCryptoServerStreamTest : public ::testing::TestWithParam<bool> {
67 public: 67 public:
68 QuicCryptoServerStreamTest() 68 QuicCryptoServerStreamTest()
69 : server_crypto_config_(QuicCryptoServerConfig::TESTING, 69 : server_crypto_config_(QuicCryptoServerConfig::TESTING,
70 QuicRandom::GetInstance()), 70 QuicRandom::GetInstance()),
71 server_id_(kServerHostname, kServerPort, false, PRIVACY_MODE_DISABLED) { 71 server_id_(kServerHostname, kServerPort, false, PRIVACY_MODE_DISABLED) {
72 // TODO(wtc): replace this with ProofSourceForTesting() when Chromium has
73 // a working ProofSourceForTesting().
74 server_crypto_config_.SetProofSource( 72 server_crypto_config_.SetProofSource(
75 CryptoTestUtils::FakeProofSourceForTesting()); 73 CryptoTestUtils::ProofSourceForTesting());
76 server_crypto_config_.set_strike_register_no_startup_period(); 74 server_crypto_config_.set_strike_register_no_startup_period();
77 75
78 InitializeServer(); 76 InitializeServer();
79 77
80 if (AsyncStrikeRegisterVerification()) { 78 if (AsyncStrikeRegisterVerification()) {
81 string orbit = 79 string orbit =
82 QuicCryptoServerConfigPeer::GetPrimaryOrbit(server_crypto_config_); 80 QuicCryptoServerConfigPeer::GetPrimaryOrbit(server_crypto_config_);
83 strike_register_client_ = new DelayedVerifyStrikeRegisterClient( 81 strike_register_client_ = new DelayedVerifyStrikeRegisterClient(
84 10000, // strike_register_max_entries 82 10000, // strike_register_max_entries
85 static_cast<uint32>( 83 static_cast<uint32>(
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 message_.Clear(); 415 message_.Clear();
418 QuicConfig stateful_reject_config = DefaultQuicConfig(); 416 QuicConfig stateful_reject_config = DefaultQuicConfig();
419 stateful_reject_config.ToHandshakeMessage(&message_); 417 stateful_reject_config.ToHandshakeMessage(&message_);
420 EXPECT_FALSE( 418 EXPECT_FALSE(
421 QuicCryptoServerStreamPeer::DoesPeerSupportStatelessRejects(message_)); 419 QuicCryptoServerStreamPeer::DoesPeerSupportStatelessRejects(message_));
422 } 420 }
423 421
424 } // namespace 422 } // namespace
425 } // namespace test 423 } // namespace test
426 } // namespace net 424 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698