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

Unified Diff: net/quic/quic_crypto_server_stream_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
« no previous file with comments | « net/quic/quic_crypto_client_stream_test.cc ('k') | net/quic/quic_end_to_end_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_crypto_server_stream_test.cc
diff --git a/net/quic/quic_crypto_server_stream_test.cc b/net/quic/quic_crypto_server_stream_test.cc
index ad968757a6c2870ad3545f437100fa0d027d6e20..af4ff42d2ed4dd98967fd1845f41247b0675ca5d 100644
--- a/net/quic/quic_crypto_server_stream_test.cc
+++ b/net/quic/quic_crypto_server_stream_test.cc
@@ -40,6 +40,8 @@ using testing::_;
namespace net {
namespace test {
+#if defined(USE_OPENSSL)
+
class QuicCryptoServerConfigPeer {
public:
static string GetPrimaryOrbit(const QuicCryptoServerConfig& config) {
@@ -68,16 +70,10 @@ class QuicCryptoServerStreamTest : public ::testing::TestWithParam<bool> {
public:
QuicCryptoServerStreamTest()
: server_crypto_config_(QuicCryptoServerConfig::TESTING,
- QuicRandom::GetInstance()),
- server_id_(kServerHostname, kServerPort, true, PRIVACY_MODE_DISABLED) {
-#if defined(USE_OPENSSL)
- server_crypto_config_.SetProofSource(
- CryptoTestUtils::ProofSourceForTesting());
-#else
- // TODO(rch): Implement a NSS proof source.
- server_crypto_config_.SetProofSource(
- CryptoTestUtils::FakeProofSourceForTesting());
-#endif
+ QuicRandom::GetInstance(),
+ CryptoTestUtils::ProofSourceForTesting()),
+ server_id_(kServerHostname, kServerPort, PRIVACY_MODE_DISABLED),
+ client_crypto_config_(CryptoTestUtils::ProofVerifierForTesting()) {
server_crypto_config_.set_strike_register_no_startup_period();
InitializeServer();
@@ -133,16 +129,6 @@ class QuicCryptoServerStreamTest : public ::testing::TestWithParam<bool> {
&client_connection_, &client_session);
CHECK(client_session);
client_session_.reset(client_session);
- if (!client_options_.dont_verify_certs) {
-#if defined(USE_OPENSSL)
- client_crypto_config_.SetProofVerifier(
- CryptoTestUtils::ProofVerifierForTesting());
-#else
- // TODO(rch): Implement a NSS proof source.
- client_crypto_config_.SetProofVerifier(
- CryptoTestUtils::FakeProofVerifierForTesting());
-#endif
- }
}
bool AsyncStrikeRegisterVerification() {
@@ -395,19 +381,6 @@ TEST_P(QuicCryptoServerStreamTest, BadMessageType) {
message_data_->AsStringPiece()));
}
-TEST_P(QuicCryptoServerStreamTest, WithoutCertificates) {
- server_crypto_config_.SetProofSource(nullptr);
- server_id_ =
- QuicServerId(kServerHostname, kServerPort, false, PRIVACY_MODE_DISABLED);
- client_options_.dont_verify_certs = true;
-
- // Only 2 client hellos need to be sent in the no-certs case: one to get the
- // source-address token and the second to finish.
- EXPECT_EQ(2, CompleteCryptoHandshake());
- EXPECT_TRUE(server_stream()->encryption_established());
- EXPECT_TRUE(server_stream()->handshake_confirmed());
-}
-
TEST_P(QuicCryptoServerStreamTest, ChannelID) {
client_options_.channel_id_enabled = true;
client_options_.channel_id_source_async = false;
@@ -449,5 +422,8 @@ TEST_P(QuicCryptoServerStreamTest, DoesPeerSupportStatelessRejects) {
}
} // namespace
+
+#endif
+
} // namespace test
} // namespace net
« no previous file with comments | « net/quic/quic_crypto_client_stream_test.cc ('k') | net/quic/quic_end_to_end_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698