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

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

Issue 1411063004: Remove insecure QUIC support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: enough! 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 8a02010629281ee86c821e32084d1a09ddcd4af1..fa5c5892e4b5e9dc1924fea8d25ac75a845b5044 100644
--- a/net/quic/crypto/crypto_server_test.cc
+++ b/net/quic/crypto/crypto_server_test.cc
@@ -106,11 +106,12 @@ class CryptoServerTest : public ::testing::TestWithParam<TestParams> {
CryptoServerTest()
: rand_(QuicRandom::GetInstance()),
client_address_(Loopback4(), 1234),
- config_(QuicCryptoServerConfig::TESTING, rand_) {
+ config_(QuicCryptoServerConfig::TESTING,
+ rand_,
#if defined(USE_OPENSSL)
- config_.SetProofSource(CryptoTestUtils::ProofSourceForTesting());
+ CryptoTestUtils::ProofSourceForTesting()) {
#else
- config_.SetProofSource(CryptoTestUtils::FakeProofSourceForTesting());
+ CryptoTestUtils::FakeProofSourceForTesting()) {
#endif
supported_versions_ = GetParam().supported_versions;
client_version_ = supported_versions_.front();
@@ -773,8 +774,18 @@ 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,
+#if defined(USE_OPENSSL)
+ CryptoTestUtils::ProofSourceForTesting());
+#else
+ CryptoTestUtils::FakeProofSourceForTesting());
+#endif
+ QuicCryptoServerConfig b(QuicCryptoServerConfig::TESTING, &rand_b,
+#if defined(USE_OPENSSL)
+ CryptoTestUtils::ProofSourceForTesting());
+#else
+ CryptoTestUtils::FakeProofSourceForTesting());
+#endif
scoped_ptr<CryptoHandshakeMessage> scfg_a(
a.AddDefaultConfig(&rand_a, &clock, options));
scoped_ptr<CryptoHandshakeMessage> scfg_b(
@@ -791,9 +802,19 @@ TEST(CryptoServerConfigGenerationTest, SCIDVaries) {
const QuicCryptoServerConfig::ConfigOptions options;
MockClock clock;
- QuicCryptoServerConfig a(QuicCryptoServerConfig::TESTING, &rand_a);
+ QuicCryptoServerConfig a(QuicCryptoServerConfig::TESTING, &rand_a,
+#if defined(USE_OPENSSL)
+ CryptoTestUtils::ProofSourceForTesting());
+#else
+ CryptoTestUtils::FakeProofSourceForTesting());
+#endif
rand_b.ChangeValue();
- QuicCryptoServerConfig b(QuicCryptoServerConfig::TESTING, &rand_b);
+ QuicCryptoServerConfig b(QuicCryptoServerConfig::TESTING, &rand_b,
+#if defined(USE_OPENSSL)
+ CryptoTestUtils::ProofSourceForTesting());
+#else
+ CryptoTestUtils::FakeProofSourceForTesting());
+#endif
scoped_ptr<CryptoHandshakeMessage> scfg_a(
a.AddDefaultConfig(&rand_a, &clock, options));
scoped_ptr<CryptoHandshakeMessage> scfg_b(
@@ -811,7 +832,12 @@ TEST(CryptoServerConfigGenerationTest, SCIDIsHashOfServerConfig) {
const QuicCryptoServerConfig::ConfigOptions options;
MockClock clock;
- QuicCryptoServerConfig a(QuicCryptoServerConfig::TESTING, &rand_a);
+ QuicCryptoServerConfig a(QuicCryptoServerConfig::TESTING, &rand_a,
+#if defined(USE_OPENSSL)
+ CryptoTestUtils::ProofSourceForTesting());
+#else
+ CryptoTestUtils::FakeProofSourceForTesting());
+#endif
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