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

Side by Side Diff: net/quic/test_tools/crypto_test_utils_test.cc

Issue 2517603003: Moves QuicTag typedefs, and QuicTag utility methods to quic_tag.{h,cc}. No behavior change. (Closed)
Patch Set: Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « net/quic/test_tools/crypto_test_utils.cc ('k') | net/tools/quic/end_to_end_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/test_tools/crypto_test_utils.h" 5 #include "net/quic/test_tools/crypto_test_utils.h"
6 6
7 #include "net/quic/core/crypto/crypto_server_config_protobuf.h" 7 #include "net/quic/core/crypto/crypto_server_config_protobuf.h"
8 #include "net/quic/core/quic_utils.h" 8 #include "net/quic/core/quic_utils.h"
9 #include "net/quic/test_tools/mock_clock.h" 9 #include "net/quic/test_tools/mock_clock.h"
10 #include "net/test/gtest_util.h" 10 #include "net/test/gtest_util.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 QuicVersion version(AllSupportedVersions().front()); 145 QuicVersion version(AllSupportedVersions().front());
146 // clang-format off 146 // clang-format off
147 CryptoHandshakeMessage inchoate_chlo = CryptoTestUtils::Message( 147 CryptoHandshakeMessage inchoate_chlo = CryptoTestUtils::Message(
148 "CHLO", 148 "CHLO",
149 "PDMD", "X509", 149 "PDMD", "X509",
150 "AEAD", "AESG", 150 "AEAD", "AESG",
151 "KEXS", "C255", 151 "KEXS", "C255",
152 "COPT", "SREJ", 152 "COPT", "SREJ",
153 "PUBS", pub_hex.c_str(), 153 "PUBS", pub_hex.c_str(),
154 "NONC", nonce_hex.c_str(), 154 "NONC", nonce_hex.c_str(),
155 "VER\0", QuicUtils::TagToString(QuicVersionToQuicTag(version)).c_str(), 155 "VER\0", QuicTagToString(QuicVersionToQuicTag(version)).c_str(),
156 "$padding", static_cast<int>(kClientHelloMinimumSize), 156 "$padding", static_cast<int>(kClientHelloMinimumSize),
157 nullptr); 157 nullptr);
158 // clang-format on 158 // clang-format on
159 159
160 CryptoTestUtils::GenerateFullCHLO(inchoate_chlo, &crypto_config, server_ip, 160 CryptoTestUtils::GenerateFullCHLO(inchoate_chlo, &crypto_config, server_ip,
161 client_addr, version, &clock, signed_config, 161 client_addr, version, &clock, signed_config,
162 &compressed_certs_cache, &full_chlo); 162 &compressed_certs_cache, &full_chlo);
163 // Verify that full_chlo can pass crypto_config's verification. 163 // Verify that full_chlo can pass crypto_config's verification.
164 ShloVerifier shlo_verifier(&crypto_config, server_ip, client_addr, &clock, 164 ShloVerifier shlo_verifier(&crypto_config, server_ip, client_addr, &clock,
165 signed_config, &compressed_certs_cache); 165 signed_config, &compressed_certs_cache);
166 crypto_config.ValidateClientHello( 166 crypto_config.ValidateClientHello(
167 full_chlo, client_addr.address(), server_ip, version, &clock, 167 full_chlo, client_addr.address(), server_ip, version, &clock,
168 signed_config, shlo_verifier.GetValidateClientHelloCallback()); 168 signed_config, shlo_verifier.GetValidateClientHelloCallback());
169 } 169 }
170 170
171 } // namespace test 171 } // namespace test
172 } // namespace net 172 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/test_tools/crypto_test_utils.cc ('k') | net/tools/quic/end_to_end_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698