diff options
author | rtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-07 02:42:02 +0000 |
---|---|---|
committer | rtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-07 02:42:02 +0000 |
commit | ffc34bf0f1eda7817216eb2ce9cdd31f97bc3b60 (patch) | |
tree | abe432a1c24028cfb0a1c649550914209809eec6 /net/quic/crypto/crypto_server_test.cc | |
parent | e6f7a0abccc7a0513e1e3654e06f6fc819933ebd (diff) | |
download | chromium_src-ffc34bf0f1eda7817216eb2ce9cdd31f97bc3b60.zip chromium_src-ffc34bf0f1eda7817216eb2ce9cdd31f97bc3b60.tar.gz chromium_src-ffc34bf0f1eda7817216eb2ce9cdd31f97bc3b60.tar.bz2 |
Land Recent QUIC Changes.
Refactor of QUIC's rtt storage and calculation to have a single RttStats
object used by the SentPacketManager, LossDetectionAlgorithms, and SendAlgorithms.
Merge internal change: 62624956
https://codereview.chromium.org/185053006/
QUIC refactor to move the pending_crypto_packet_count_ from the
QuicSentPacketManager to the QuicUnackedPacketMap.
Merge internal change: 62614116
https://codereview.chromium.org/188273003/
QUIC - Fix the spelling error in "frame received." message.
Merge internal change: 62491376
https://codereview.chromium.org/188173003/
Doing a best-effort attempt to send connection close packet for open
quic connection before we call exit().
The actual sending of the connection close is flag protected, though
worst case we'd crash right before exit() anyway.
Merge internal change: 62484710
https://codereview.chromium.org/180953008/
Test only change to QUIC TCPLossAlgorithmTest to ensure the early
retransmit alarms is set for the earliest outstanding packet.
Merge internal change: 62438180
https://codereview.chromium.org/188153003/
CL generated with data from dead-code analysis using Scythe
remove_dead_code tool.
Cleanup of net/quic using Scythe
Merge internal change: 62404986
https://codereview.chromium.org/183683025/
Allow fixed (non-negotiated) values to be sent in QUIC CHLO/SHLO. Also
adds IFCW tag for describing initial flow control window in CHLO/SHLO.
Not used yet.
Merge internal change: 62403534
https://codereview.chromium.org/188183002/
Sync'ing changes with internal tree.
https://codereview.chromium.org/184853014/
Merge internal change: 62295877
Make the VER tag required in QUIC CHLO and SHLO messages.
Merge internal change: 62286870
https://codereview.chromium.org/186313002/
R=rch@chromium.org
Review URL: https://codereview.chromium.org/188333003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255503 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/quic/crypto/crypto_server_test.cc')
-rw-r--r-- | net/quic/crypto/crypto_server_test.cc | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/net/quic/crypto/crypto_server_test.cc b/net/quic/crypto/crypto_server_test.cc index 0cce264..f1892d3 100644 --- a/net/quic/crypto/crypto_server_test.cc +++ b/net/quic/crypto/crypto_server_test.cc @@ -44,6 +44,8 @@ class CryptoServerTest : public ::testing::Test { config_(QuicCryptoServerConfig::TESTING, rand_) { config_.SetProofSource(CryptoTestUtils::ProofSourceForTesting()); supported_versions_ = QuicSupportedVersions(); + client_version_ = QuicUtils::TagToString( + QuicVersionToQuicTag(supported_versions_.front())); } virtual void SetUp() { @@ -69,6 +71,7 @@ class CryptoServerTest : public ::testing::Test { "KEXS", "C255", "PUBS", pub_hex_.c_str(), "NONC", nonce_hex_.c_str(), + "VER\0", client_version_.data(), "$padding", static_cast<int>(kClientHelloMinimumSize), NULL); ShouldSucceed(client_hello); @@ -221,6 +224,7 @@ class CryptoServerTest : public ::testing::Test { MockClock clock_; const IPEndPoint client_address_; QuicVersionVector supported_versions_; + string client_version_; QuicCryptoServerConfig config_; QuicCryptoServerConfig::ConfigOptions config_options_; QuicCryptoNegotiatedParameters params_; @@ -243,10 +247,14 @@ TEST_F(CryptoServerTest, BadSNI) { "ffee::1", }; + string client_version = QuicUtils::TagToString( + QuicVersionToQuicTag(supported_versions_.front())); + for (size_t i = 0; i < arraysize(kBadSNIs); i++) { ShouldFailMentioning("SNI", InchoateClientHello( "CHLO", "SNI", kBadSNIs[i], + "VER\0", client_version.data(), NULL)); } } @@ -265,6 +273,7 @@ TEST_F(CryptoServerTest, DISABLED_DefaultCert) { "NONC", nonce_hex_.c_str(), "$padding", static_cast<int>(kClientHelloMinimumSize), "PDMD", "X509", + "VER\0", client_version_.data(), NULL)); StringPiece cert, proof; @@ -277,6 +286,7 @@ TEST_F(CryptoServerTest, DISABLED_DefaultCert) { TEST_F(CryptoServerTest, TooSmall) { ShouldFailMentioning("too small", CryptoTestUtils::Message( "CHLO", + "VER\0", client_version_.data(), NULL)); } @@ -293,6 +303,7 @@ TEST_F(CryptoServerTest, BadSourceAddressToken) { ShouldSucceed(InchoateClientHello( "CHLO", "STK", kBadSourceAddressTokens[i], + "VER\0", client_version_.data(), NULL)); } } @@ -309,6 +320,7 @@ TEST_F(CryptoServerTest, BadClientNonce) { ShouldSucceed(InchoateClientHello( "CHLO", "NONC", kBadNonces[i], + "VER\0", client_version_.data(), NULL)); } } @@ -320,12 +332,12 @@ TEST_F(CryptoServerTest, DowngradeAttack) { } // Set the client's preferred version to a supported version that // is not the "current" version (supported_versions_.front()). - string client_version = QuicUtils::TagToString( + string bad_version = QuicUtils::TagToString( QuicVersionToQuicTag(supported_versions_.back())); ShouldFailMentioning("Downgrade", InchoateClientHello( "CHLO", - "VER\0", client_version.data(), + "VER\0", bad_version.data(), NULL)); } @@ -339,6 +351,7 @@ TEST_F(CryptoServerTest, ReplayProtection) { "#004b5453", srct_hex_.c_str(), "PUBS", pub_hex_.c_str(), "NONC", nonce_hex_.c_str(), + "VER\0", client_version_.data(), "$padding", static_cast<int>(kClientHelloMinimumSize), NULL); ShouldSucceed(msg); @@ -439,6 +452,7 @@ class CryptoServerTestNoConfig : public CryptoServerTest { TEST_F(CryptoServerTestNoConfig, DontCrash) { ShouldFailMentioning("No config", InchoateClientHello( "CHLO", + "VER\0", client_version_.data(), NULL)); } @@ -474,6 +488,7 @@ TEST_F(AsyncStrikeServerVerificationTest, AsyncReplayProtection) { "#004b5453", srct_hex_.c_str(), "PUBS", pub_hex_.c_str(), "NONC", nonce_hex_.c_str(), + "VER\0", client_version_.data(), "$padding", static_cast<int>(kClientHelloMinimumSize), NULL); |