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

Unified Diff: net/quic/crypto/crypto_server_test.cc

Issue 1404053002: relnote: Disables strike register lookups when talking QUIC_VERSION_27 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Remove_unused_supported_versions_103964623
Patch Set: Use a smaller cert and delete the TODO 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 | « no previous file | net/quic/crypto/quic_crypto_server_config.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6c991f2313a7a989141f04157ad9971a526c229d..020c32c7648e5b770d206b70fdba24dbf9344ec1 100644
--- a/net/quic/crypto/crypto_server_test.cc
+++ b/net/quic/crypto/crypto_server_test.cc
@@ -400,22 +400,18 @@ TEST_P(CryptoServerTest, BadSNI) {
}
}
-// TODO(rtenneti): Enable the DefaultCert test after implementing ProofSource.
-// See http://crbug.com/514472.
TEST_P(CryptoServerTest, DefaultCert) {
// Check that the server replies with a default certificate when no SNI is
- // specified.
+ // specified. The CHLO is constructed to generate a REJ with certs, so must
+ // not contain a valid STK, and must include PDMD.
// 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(),
"PDMD", "X509",
- "XLCT", XlctHexString().c_str(),
"VER\0", client_version_string_.c_str(),
"$padding", static_cast<int>(kClientHelloMinimumSize),
nullptr);
@@ -427,9 +423,15 @@ TEST_P(CryptoServerTest, DefaultCert) {
EXPECT_TRUE(out_.GetStringPiece(kPROF, &proof));
EXPECT_NE(0u, cert.size());
EXPECT_NE(0u, proof.size());
- const HandshakeFailureReason kRejectReasons[] = {
- CLIENT_NONCE_INVALID_TIME_FAILURE};
- CheckRejectReasons(kRejectReasons, arraysize(kRejectReasons));
+ if (client_version_ <= QUIC_VERSION_26) {
+ const HandshakeFailureReason kRejectReasons[] = {
+ CLIENT_NONCE_INVALID_TIME_FAILURE};
+ CheckRejectReasons(kRejectReasons, arraysize(kRejectReasons));
+ } else {
+ const HandshakeFailureReason kRejectReasons[] = {
+ SERVER_CONFIG_INCHOATE_HELLO_FAILURE};
+ CheckRejectReasons(kRejectReasons, arraysize(kRejectReasons));
+ }
}
TEST_P(CryptoServerTest, TooSmall) {
@@ -606,14 +608,23 @@ TEST_P(CryptoServerTest, CorruptMultipleTags) {
// clang-format on
ShouldSucceed(msg);
CheckRejectTag();
- const HandshakeFailureReason kRejectReasons[] = {
- SOURCE_ADDRESS_TOKEN_DECRYPTION_FAILURE, CLIENT_NONCE_INVALID_FAILURE,
- SERVER_NONCE_DECRYPTION_FAILURE,
+
+ if (client_version_ <= QUIC_VERSION_26) {
+ const HandshakeFailureReason kRejectReasons[] = {
+ SOURCE_ADDRESS_TOKEN_DECRYPTION_FAILURE, CLIENT_NONCE_INVALID_FAILURE,
+ SERVER_NONCE_DECRYPTION_FAILURE};
+ CheckRejectReasons(kRejectReasons, arraysize(kRejectReasons));
+ } else {
+ const HandshakeFailureReason kRejectReasons[] = {
+ SOURCE_ADDRESS_TOKEN_DECRYPTION_FAILURE, CLIENT_NONCE_INVALID_FAILURE};
+ CheckRejectReasons(kRejectReasons, arraysize(kRejectReasons));
};
- CheckRejectReasons(kRejectReasons, arraysize(kRejectReasons));
}
TEST_P(CryptoServerTest, ReplayProtection) {
+ if (client_version_ > QUIC_VERSION_26) {
+ return;
+ }
// This tests that disabling replay protection works.
// clang-format off
CryptoHandshakeMessage msg = CryptoTestUtils::Message(
« no previous file with comments | « no previous file | net/quic/crypto/quic_crypto_server_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698