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

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

Issue 1569853005: relnote: Require QUIC handshakes to require either a valid server nonce or a remote strike register. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@02_CL_111655037
Patch Set: rebase after remove 111628983 Created 4 years, 11 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
« no previous file with comments | « net/quic/crypto/quic_crypto_server_config.cc ('k') | net/quic/quic_flags.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 EXPECT_EQ(1u, messages_moved.first); 370 EXPECT_EQ(1u, messages_moved.first);
371 EXPECT_EQ(1u, messages_moved.second); 371 EXPECT_EQ(1u, messages_moved.second);
372 EXPECT_TRUE(client_stream()->handshake_confirmed()); 372 EXPECT_TRUE(client_stream()->handshake_confirmed());
373 EXPECT_TRUE(server_stream()->handshake_confirmed()); 373 EXPECT_TRUE(server_stream()->handshake_confirmed());
374 } else { 374 } else {
375 CryptoTestUtils::CommunicateHandshakeMessages( 375 CryptoTestUtils::CommunicateHandshakeMessages(
376 client_connection_, client_stream(), server_connection_, 376 client_connection_, client_stream(), server_connection_,
377 server_stream()); 377 server_stream());
378 } 378 }
379 379
380 EXPECT_EQ(1, client_stream()->num_sent_client_hellos()); 380 if (FLAGS_require_strike_register_or_server_nonce &&
381 !AsyncStrikeRegisterVerification()) {
382 EXPECT_EQ(2, client_stream()->num_sent_client_hellos());
383 } else {
384 EXPECT_EQ(1, client_stream()->num_sent_client_hellos());
385 }
381 } 386 }
382 387
383 TEST_P(QuicCryptoServerStreamTest, MessageAfterHandshake) { 388 TEST_P(QuicCryptoServerStreamTest, MessageAfterHandshake) {
384 FLAGS_quic_require_fix = false; 389 FLAGS_quic_require_fix = false;
385 Initialize(); 390 Initialize();
386 CompleteCryptoHandshake(); 391 CompleteCryptoHandshake();
387 EXPECT_CALL(*server_connection_, 392 EXPECT_CALL(*server_connection_,
388 SendConnectionCloseWithDetails( 393 SendConnectionCloseWithDetails(
389 QUIC_CRYPTO_MESSAGE_AFTER_HANDSHAKE_COMPLETE, _)); 394 QUIC_CRYPTO_MESSAGE_AFTER_HANDSHAKE_COMPLETE, _));
390 message_.set_tag(kCHLO); 395 message_.set_tag(kCHLO);
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 /*from_peer=*/true); 522 /*from_peer=*/true);
518 523
519 // The outstanding nonce verification RPC now completes. 524 // The outstanding nonce verification RPC now completes.
520 strike_register_client_->RunPendingVerifications(); 525 strike_register_client_->RunPendingVerifications();
521 } 526 }
522 527
523 } // namespace 528 } // namespace
524 529
525 } // namespace test 530 } // namespace test
526 } // namespace net 531 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/crypto/quic_crypto_server_config.cc ('k') | net/quic/quic_flags.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698