| 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 16140937c363bf4bdf7b17b5f36fbc9452c12de2..c65927aa9137756d387ca385088561140a7cd949 100644
|
| --- a/net/quic/crypto/crypto_server_test.cc
|
| +++ b/net/quic/crypto/crypto_server_test.cc
|
| @@ -584,7 +584,6 @@ TEST_P(CryptoServerTest, BadSourceAddressToken) {
|
| }
|
|
|
| TEST_P(CryptoServerTest, BadClientNonce) {
|
| - // Invalid nonces should be ignored.
|
| // clang-format off
|
| static const char* const kBadNonces[] = {
|
| "",
|
| @@ -594,6 +593,7 @@ TEST_P(CryptoServerTest, BadClientNonce) {
|
| // clang-format on
|
|
|
| for (size_t i = 0; i < arraysize(kBadNonces); i++) {
|
| + // Invalid nonces should be ignored, in an inchoate CHLO.
|
| // clang-format off
|
| CryptoHandshakeMessage msg = CryptoTestUtils::Message(
|
| "CHLO",
|
| @@ -606,6 +606,30 @@ TEST_P(CryptoServerTest, BadClientNonce) {
|
| const HandshakeFailureReason kRejectReasons[] = {
|
| SERVER_CONFIG_INCHOATE_HELLO_FAILURE};
|
| CheckRejectReasons(kRejectReasons, arraysize(kRejectReasons));
|
| +
|
| + // Invalid nonces should result in CLIENT_NONCE_INVALID_FAILURE.
|
| + // clang-format off
|
| + CryptoHandshakeMessage msg1 = CryptoTestUtils::Message(
|
| + "CHLO",
|
| + "AEAD", "AESG",
|
| + "KEXS", "C255",
|
| + "SCID", scid_hex_.c_str(),
|
| + "#004b5453", srct_hex_.c_str(),
|
| + "PUBS", pub_hex_.c_str(),
|
| + "NONC", kBadNonces[i],
|
| + "NONP", kBadNonces[i],
|
| + "XLCT", XlctHexString().c_str(),
|
| + "VER\0", client_version_string_.c_str(),
|
| + "$padding", static_cast<int>(kClientHelloMinimumSize),
|
| + nullptr);
|
| + // clang-format on
|
| +
|
| + ShouldSucceed(msg1);
|
| +
|
| + CheckRejectTag();
|
| + const HandshakeFailureReason kRejectReasons1[] = {
|
| + CLIENT_NONCE_INVALID_FAILURE};
|
| + CheckRejectReasons(kRejectReasons1, arraysize(kRejectReasons1));
|
| }
|
| }
|
|
|
|
|