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

Unified Diff: net/quic/test_tools/crypto_test_utils_test.cc

Issue 2681793002: Landing Recent QUIC changes until 5:30 PM, Feb 3, 2017 UTC-5 (Closed)
Patch Set: sync and rebase Created 3 years, 10 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 | « net/quic/test_tools/crypto_test_utils.cc ('k') | net/quic/test_tools/failing_proof_source.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/test_tools/crypto_test_utils_test.cc
diff --git a/net/quic/test_tools/crypto_test_utils_test.cc b/net/quic/test_tools/crypto_test_utils_test.cc
index 85069446e418cf2dd2c9f381fed2a4c100239fed..2349f1f9c5154e2c5fb1f6f601fe8999587aa8eb 100644
--- a/net/quic/test_tools/crypto_test_utils_test.cc
+++ b/net/quic/test_tools/crypto_test_utils_test.cc
@@ -112,7 +112,7 @@ TEST(CryptoTestUtilsTest, TestGenerateFullCHLO) {
MockClock clock;
QuicCryptoServerConfig crypto_config(
QuicCryptoServerConfig::TESTING, QuicRandom::GetInstance(),
- CryptoTestUtils::ProofSourceForTesting());
+ crypto_test_utils::ProofSourceForTesting());
QuicSocketAddress server_addr;
QuicSocketAddress client_addr(QuicIpAddress::Loopback4(), 1);
QuicReferenceCountedPointer<QuicSignedServerConfig> signed_config(
@@ -148,23 +148,19 @@ TEST(CryptoTestUtilsTest, TestGenerateFullCHLO) {
"#" + QuicTextUtils::HexEncode(public_value, sizeof(public_value));
QuicVersion version(AllSupportedVersions().front());
- // clang-format off
- CryptoHandshakeMessage inchoate_chlo = CryptoTestUtils::Message(
- "CHLO",
- "PDMD", "X509",
- "AEAD", "AESG",
- "KEXS", "C255",
- "COPT", "SREJ",
- "PUBS", pub_hex.c_str(),
- "NONC", nonce_hex.c_str(),
- "VER\0", QuicTagToString(QuicVersionToQuicTag(version)).c_str(),
- "$padding", static_cast<int>(kClientHelloMinimumSize),
- nullptr);
- // clang-format on
-
- CryptoTestUtils::GenerateFullCHLO(inchoate_chlo, &crypto_config, server_addr,
- client_addr, version, &clock, signed_config,
- &compressed_certs_cache, &full_chlo);
+ CryptoHandshakeMessage inchoate_chlo = crypto_test_utils::CreateCHLO(
+ {{"PDMD", "X509"},
+ {"AEAD", "AESG"},
+ {"KEXS", "C255"},
+ {"COPT", "SREJ"},
+ {"PUBS", pub_hex},
+ {"NONC", nonce_hex},
+ {"VER\0", QuicTagToString(QuicVersionToQuicTag(version))}},
+ kClientHelloMinimumSize);
+
+ crypto_test_utils::GenerateFullCHLO(
+ inchoate_chlo, &crypto_config, server_addr, client_addr, version, &clock,
+ signed_config, &compressed_certs_cache, &full_chlo);
// Verify that full_chlo can pass crypto_config's verification.
ShloVerifier shlo_verifier(&crypto_config, server_addr, client_addr, &clock,
signed_config, &compressed_certs_cache);
« no previous file with comments | « net/quic/test_tools/crypto_test_utils.cc ('k') | net/quic/test_tools/failing_proof_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698