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

Unified Diff: net/quic/crypto/crypto_server_test.cc

Issue 1397983007: relnote: remove insecure QUIC support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rch_insecure_quic
Patch Set: Compile fix Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: net/quic/crypto/crypto_server_test.cc
diff --git a/net/quic/crypto/crypto_server_test.cc b/net/quic/crypto/crypto_server_test.cc
index a905597af056b6f8544a5626190ff3551f3a8944..6c991f2313a7a989141f04157ad9971a526c229d 100644
--- a/net/quic/crypto/crypto_server_test.cc
+++ b/net/quic/crypto/crypto_server_test.cc
@@ -94,12 +94,9 @@ class CryptoServerTest : public ::testing::TestWithParam<TestParams> {
CryptoServerTest()
: rand_(QuicRandom::GetInstance()),
client_address_(Loopback4(), 1234),
- config_(QuicCryptoServerConfig::TESTING, rand_) {
-#if defined(USE_OPENSSL)
- config_.SetProofSource(CryptoTestUtils::ProofSourceForTesting());
-#else
- config_.SetProofSource(CryptoTestUtils::FakeProofSourceForTesting());
-#endif
+ config_(QuicCryptoServerConfig::TESTING,
+ rand_,
+ CryptoTestUtils::ProofSourceForTesting()) {
supported_versions_ = QuicSupportedVersions();
client_version_ = supported_versions_.front();
client_version_string_ =
@@ -334,13 +331,8 @@ class CryptoServerTest : public ::testing::TestWithParam<TestParams> {
const vector<string>* certs;
IPAddressNumber server_ip;
string sig;
-#if defined(USE_OPENSSL)
scoped_ptr<ProofSource> proof_source(
CryptoTestUtils::ProofSourceForTesting());
-#else
- scoped_ptr<ProofSource> proof_source(
- CryptoTestUtils::FakeProofSourceForTesting());
-#endif
if (!proof_source->GetProof(server_ip, "", "", false, &certs, &sig) ||
certs->empty()) {
return "#0100000000000000";
@@ -752,8 +744,10 @@ TEST(CryptoServerConfigGenerationTest, Determinism) {
const QuicCryptoServerConfig::ConfigOptions options;
MockClock clock;
- QuicCryptoServerConfig a(QuicCryptoServerConfig::TESTING, &rand_a);
- QuicCryptoServerConfig b(QuicCryptoServerConfig::TESTING, &rand_b);
+ QuicCryptoServerConfig a(QuicCryptoServerConfig::TESTING, &rand_a,
+ CryptoTestUtils::ProofSourceForTesting());
+ QuicCryptoServerConfig b(QuicCryptoServerConfig::TESTING, &rand_b,
+ CryptoTestUtils::ProofSourceForTesting());
scoped_ptr<CryptoHandshakeMessage> scfg_a(
a.AddDefaultConfig(&rand_a, &clock, options));
scoped_ptr<CryptoHandshakeMessage> scfg_b(
@@ -770,9 +764,11 @@ TEST(CryptoServerConfigGenerationTest, SCIDVaries) {
const QuicCryptoServerConfig::ConfigOptions options;
MockClock clock;
- QuicCryptoServerConfig a(QuicCryptoServerConfig::TESTING, &rand_a);
+ QuicCryptoServerConfig a(QuicCryptoServerConfig::TESTING, &rand_a,
+ CryptoTestUtils::ProofSourceForTesting());
rand_b.ChangeValue();
- QuicCryptoServerConfig b(QuicCryptoServerConfig::TESTING, &rand_b);
+ QuicCryptoServerConfig b(QuicCryptoServerConfig::TESTING, &rand_b,
+ CryptoTestUtils::ProofSourceForTesting());
scoped_ptr<CryptoHandshakeMessage> scfg_a(
a.AddDefaultConfig(&rand_a, &clock, options));
scoped_ptr<CryptoHandshakeMessage> scfg_b(
@@ -790,7 +786,8 @@ TEST(CryptoServerConfigGenerationTest, SCIDIsHashOfServerConfig) {
const QuicCryptoServerConfig::ConfigOptions options;
MockClock clock;
- QuicCryptoServerConfig a(QuicCryptoServerConfig::TESTING, &rand_a);
+ QuicCryptoServerConfig a(QuicCryptoServerConfig::TESTING, &rand_a,
+ CryptoTestUtils::ProofSourceForTesting());
scoped_ptr<CryptoHandshakeMessage> scfg(
a.AddDefaultConfig(&rand_a, &clock, options));
« no previous file with comments | « net/http/http_server_properties_manager_unittest.cc ('k') | net/quic/crypto/properties_based_quic_server_info_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698