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

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: More iOS fix Created 5 years, 3 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 72 #if defined(USE_OPENSSL)
73 // a working ProofSourceForTesting(). 73 server_crypto_config_.SetProofSource(
74 CryptoTestUtils::ProofSourceForTesting());
75 #else
76 // TODO(rch): Implement a NSS proof source.
74 server_crypto_config_.SetProofSource( 77 server_crypto_config_.SetProofSource(
75 CryptoTestUtils::FakeProofSourceForTesting()); 78 CryptoTestUtils::FakeProofSourceForTesting());
79 #endif
76 server_crypto_config_.set_strike_register_no_startup_period(); 80 server_crypto_config_.set_strike_register_no_startup_period();
77 81
78 InitializeServer(); 82 InitializeServer();
79 83
80 if (AsyncStrikeRegisterVerification()) { 84 if (AsyncStrikeRegisterVerification()) {
81 string orbit = 85 string orbit =
82 QuicCryptoServerConfigPeer::GetPrimaryOrbit(server_crypto_config_); 86 QuicCryptoServerConfigPeer::GetPrimaryOrbit(server_crypto_config_);
83 strike_register_client_ = new DelayedVerifyStrikeRegisterClient( 87 strike_register_client_ = new DelayedVerifyStrikeRegisterClient(
84 10000, // strike_register_max_entries 88 10000, // strike_register_max_entries
85 static_cast<uint32>( 89 static_cast<uint32>(
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 message_.Clear(); 421 message_.Clear();
418 QuicConfig stateful_reject_config = DefaultQuicConfig(); 422 QuicConfig stateful_reject_config = DefaultQuicConfig();
419 stateful_reject_config.ToHandshakeMessage(&message_); 423 stateful_reject_config.ToHandshakeMessage(&message_);
420 EXPECT_FALSE( 424 EXPECT_FALSE(
421 QuicCryptoServerStreamPeer::DoesPeerSupportStatelessRejects(message_)); 425 QuicCryptoServerStreamPeer::DoesPeerSupportStatelessRejects(message_));
422 } 426 }
423 427
424 } // namespace 428 } // namespace
425 } // namespace test 429 } // namespace test
426 } // namespace net 430 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/crypto/proof_source_chromium_openssl.cc ('k') | net/quic/test_tools/crypto_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698