diff options
author | zhongyi <zhongyi@chromium.org> | 2016-01-12 12:08:31 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-12 20:09:32 +0000 |
commit | 4a9d27b850291097879dde36c408e15a9216609a (patch) | |
tree | ace8eaeb09d1360052f117a804dcb56f7be05aa1 /net/quic/crypto/crypto_server_test.cc | |
parent | 8f3387ec549ec8b5d0f20f652a5e93179b65252c (diff) | |
download | chromium_src-4a9d27b850291097879dde36c408e15a9216609a.zip chromium_src-4a9d27b850291097879dde36c408e15a9216609a.tar.gz chromium_src-4a9d27b850291097879dde36c408e15a9216609a.tar.bz2 |
Landing Recent QUIC changes until 1/8/2015 23:22 UTC
relnote: Allowing multipath support negotiation. Protected by --quic_enable_multipath, default value is false.
Merge internal change: 111718558
https://codereview.chromium.org/1572033003
relnote: Implement server push methods in QuicSimpleServerSession. Only modify toy Quic server, not used in production.
Merege internal change: 111716301
https://codereview.chromium.org/1570343005
relnote: Require QUIC handshakes to require either a valid server nonce or a remote strike register.
Merge internal change: 111708360
https://codereview.chromium.org/1569853005
relnote: n/a test-only change.
Change QUIC's General and TCP loss algorithm tests to create
RetransmittableFrames with a QuicStreamFrame instead of no stream
frames.
Merge internal change: 111655037
https://codereview.chromium.org/1570363002
relnote: Re-enable strike register lookups for QUIC replay protection, until at least QUIC_VERSION_31. Not flag protected, as Chrome currently only talks QUIC_VERSION_25.
Merge internal change: 111628540
https://codereview.chromium.org/1574633002
relnote: n/a (test only)
Always create a SerializedPacket with at least one QuicFrame in the
RetransmittableFrames.
Merge internal change: 111570157
https://codereview.chromium.org/1576553003
relnote: quic_supports_push_promise should be disabled by default.
Merge internal change: 111560672
https://codereview.chromium.org/1576623002
relnote: QUIC header streams support to receive PUSH_PROMISE. Protected by --quic_supports_push_promise.
This is part of shared code, but client side functionality only.
Merge internal change: 111542509
https://codereview.chromium.org/1572013002
relnote: always sending kFIXD And extending the lifetime of the flag. When we deprecate the old version we can flip it false again and then nuke the code.
Merge internal change: 111507546
https://codereview.chromium.org/1574623002
relnote: Merge all fields of QueuedPacket into SerializedPacket. No functional change.
Makes it easier to make SerializedPacket a class that owns its members
in the future.
Merge internal change: 111444711
https://codereview.chromium.org/1569823008
relnote: Deprecate reloadable_flag_quic_inplace_encryption.
Merge internal change: 111440524
https://codereview.chromium.org/1570553002
relnote: add new unused functions for client side of QUIC server push. QUIC - Add helper functions for SpdyHeaderBlock values.
Merge internal change: 111439689
https://codereview.chromium.org/1561383002
relnote: n/a (test only) QUIC - make MockConnectionHelper::TestAlarm public.
This is test only, and no-op for now. It will be used by a subsequent
CL in support of client-side server push.
Merge internal change: 111427940
https://codereview.chromium.org/1563083002
relnote: Adds Slow Start with Large Reduction (SSLR) option in QUIC to do a large reduction of the congestion window when exiting slow start.
When exiting slow start due to loss, SSLR causes the congestion window
to be reduced by the number of losses encountered at the end of slow
start. SSLR is expected to reduce retransmission rates when exiting slow
start, and it should also help the congestion window converge rapidly
when the connection's actual BDP is smaller than the IW.
Merge internal change: 111385694
https://codereview.chromium.org/1566853002
relnote: Clear the FEC group in QuicPacketCreator when encryption_level is none and close the connection if SerializeFec is called. Protected by gfe2_reloadable_flag_never_write_unencrypted_data.
Merge internal change: 111385311
https://codereview.chromium.org/1562833003
relnote: Moving many QUIC DFATALS over to QUIC_BUG
Merge internal change: 111359954
https://codereview.chromium.org/1565883003
relnote: Change memcpy to memmove in QuicFramer::EncryptPayload, because the src and dest buffers may be identical. No functional change.
Merge internal change: 111345350
https://codereview.chromium.org/1558423002
rel-note: A small refactoring to make RecordSpuriousRetransmission() of QuicSentPacketManager simpler. (no functional change)
Merge internal change: 111321766
https://codereview.chromium.org/1566633002
BUG=
Review URL: https://codereview.chromium.org/1579033002
Cr-Commit-Position: refs/heads/master@{#368964}
Diffstat (limited to 'net/quic/crypto/crypto_server_test.cc')
-rw-r--r-- | net/quic/crypto/crypto_server_test.cc | 36 |
1 files changed, 32 insertions, 4 deletions
diff --git a/net/quic/crypto/crypto_server_test.cc b/net/quic/crypto/crypto_server_test.cc index b1ea7f0..b2fa347 100644 --- a/net/quic/crypto/crypto_server_test.cc +++ b/net/quic/crypto/crypto_server_test.cc @@ -359,9 +359,9 @@ class CryptoServerTest : public ::testing::TestWithParam<TestParams> { void CheckRejectTag() { if (RejectsAreStateless()) { - ASSERT_EQ(kSREJ, out_.tag()); + ASSERT_EQ(kSREJ, out_.tag()) << QuicUtils::TagToString(out_.tag()); } else { - ASSERT_EQ(kREJ, out_.tag()); + ASSERT_EQ(kREJ, out_.tag()) << QuicUtils::TagToString(out_.tag()); } } @@ -745,7 +745,7 @@ TEST_P(CryptoServerTest, CorruptMultipleTags) { ShouldSucceed(msg); CheckRejectTag(); - if (client_version_ <= QUIC_VERSION_26) { + if (client_version_ <= QUIC_VERSION_30) { const HandshakeFailureReason kRejectReasons[] = { SOURCE_ADDRESS_TOKEN_DECRYPTION_FAILURE, CLIENT_NONCE_INVALID_FAILURE, SERVER_NONCE_DECRYPTION_FAILURE}; @@ -758,9 +758,10 @@ TEST_P(CryptoServerTest, CorruptMultipleTags) { } TEST_P(CryptoServerTest, ReplayProtection) { - if (client_version_ > QUIC_VERSION_26) { + if (client_version_ > QUIC_VERSION_30) { return; } + FLAGS_require_strike_register_or_server_nonce = false; // This tests that disabling replay protection works. // clang-format off CryptoHandshakeMessage msg = CryptoTestUtils::Message( @@ -798,6 +799,33 @@ TEST_P(CryptoServerTest, ReplayProtection) { CheckServerHello(out_); } +TEST_P(CryptoServerTest, NoServerNonce) { + FLAGS_require_strike_register_or_server_nonce = true; + // When no server nonce is present and no strike register is configured, + // the CHLO should be rejected. + // clang-format off + CryptoHandshakeMessage msg = CryptoTestUtils::Message( + "CHLO", + "AEAD", "AESG", + "KEXS", "C255", + "SCID", scid_hex_.c_str(), + "#004b5453", srct_hex_.c_str(), + "PUBS", pub_hex_.c_str(), + "NONC", nonce_hex_.c_str(), + "XLCT", XlctHexString().c_str(), + "VER\0", client_version_string_.c_str(), + "$padding", static_cast<int>(kClientHelloMinimumSize), + nullptr); + // clang-format on + + ShouldSucceed(msg); + + CheckRejectTag(); + const HandshakeFailureReason kRejectReasons[] = { + SERVER_NONCE_REQUIRED_FAILURE}; + CheckRejectReasons(kRejectReasons, arraysize(kRejectReasons)); +} + TEST_P(CryptoServerTest, ProofForSuppliedServerConfig) { ValueRestore<bool> old_flag(&FLAGS_quic_use_primary_config_for_proof, true); client_address_ = IPEndPoint(Loopback6(), 1234); |