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

Side by Side Diff: net/quic/test_tools/crypto_test_utils.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/core/quic_versions.cc ('k') | net/quic/test_tools/crypto_test_utils_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 <memory> 7 #include <memory>
8 8
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "crypto/openssl_util.h" 10 #include "crypto/openssl_util.h"
(...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after
952 QuicCryptoServerConfig* crypto_config) { 952 QuicCryptoServerConfig* crypto_config) {
953 // clang-format off 953 // clang-format off
954 return CryptoTestUtils::Message( 954 return CryptoTestUtils::Message(
955 "CHLO", 955 "CHLO",
956 "PDMD", "X509", 956 "PDMD", "X509",
957 "AEAD", "AESG", 957 "AEAD", "AESG",
958 "KEXS", "C255", 958 "KEXS", "C255",
959 "PUBS", CryptoTestUtils::GenerateClientPublicValuesHex().c_str(), 959 "PUBS", CryptoTestUtils::GenerateClientPublicValuesHex().c_str(),
960 "NONC", CryptoTestUtils::GenerateClientNonceHex(clock, 960 "NONC", CryptoTestUtils::GenerateClientNonceHex(clock,
961 crypto_config).c_str(), 961 crypto_config).c_str(),
962 "VER\0", QuicUtils::TagToString( 962 "VER\0", QuicTagToString(
963 QuicVersionToQuicTag(version)).c_str(), 963 QuicVersionToQuicTag(version)).c_str(),
964 "$padding", static_cast<int>(kClientHelloMinimumSize), 964 "$padding", static_cast<int>(kClientHelloMinimumSize),
965 nullptr); 965 nullptr);
966 // clang-format on 966 // clang-format on
967 } 967 }
968 968
969 string CryptoTestUtils::GenerateClientNonceHex( 969 string CryptoTestUtils::GenerateClientNonceHex(
970 const QuicClock* clock, 970 const QuicClock* clock,
971 QuicCryptoServerConfig* crypto_config) { 971 QuicCryptoServerConfig* crypto_config) {
972 net::QuicCryptoServerConfig::ConfigOptions old_config_options; 972 net::QuicCryptoServerConfig::ConfigOptions old_config_options;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
1011 // Pass a inchoate CHLO. 1011 // Pass a inchoate CHLO.
1012 FullChloGenerator generator(crypto_config, server_ip, client_addr, clock, 1012 FullChloGenerator generator(crypto_config, server_ip, client_addr, clock,
1013 proof, compressed_certs_cache, out); 1013 proof, compressed_certs_cache, out);
1014 crypto_config->ValidateClientHello( 1014 crypto_config->ValidateClientHello(
1015 inchoate_chlo, client_addr.address(), server_ip, version, clock, proof, 1015 inchoate_chlo, client_addr.address(), server_ip, version, clock, proof,
1016 generator.GetValidateClientHelloCallback()); 1016 generator.GetValidateClientHelloCallback());
1017 } 1017 }
1018 1018
1019 } // namespace test 1019 } // namespace test
1020 } // namespace net 1020 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_versions.cc ('k') | net/quic/test_tools/crypto_test_utils_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698