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

Side by Side Diff: net/quic/test_tools/crypto_test_utils.h

Issue 2511643002: Refactoring output of ProofSource::GetProof (no functional changes). (Closed)
Patch Set: Refactoring output of ProofSource::GetProof (no functional changes). 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/quartc/quartc_session_test.cc ('k') | net/quic/test_tools/crypto_test_utils.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 #ifndef NET_QUIC_TEST_TOOLS_CRYPTO_TEST_UTILS_H_ 5 #ifndef NET_QUIC_TEST_TOOLS_CRYPTO_TEST_UTILS_H_
6 #define NET_QUIC_TEST_TOOLS_CRYPTO_TEST_UTILS_H_ 6 #define NET_QUIC_TEST_TOOLS_CRYPTO_TEST_UTILS_H_
7 7
8 #include <stdarg.h> 8 #include <stdarg.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 Perspective dest_perspective); 205 Perspective dest_perspective);
206 206
207 // Return an inchoate CHLO with some basic tag value std:pairs. 207 // Return an inchoate CHLO with some basic tag value std:pairs.
208 static CryptoHandshakeMessage GenerateDefaultInchoateCHLO( 208 static CryptoHandshakeMessage GenerateDefaultInchoateCHLO(
209 const QuicClock* clock, 209 const QuicClock* clock,
210 QuicVersion version, 210 QuicVersion version,
211 QuicCryptoServerConfig* crypto_config); 211 QuicCryptoServerConfig* crypto_config);
212 212
213 // Takes a inchoate CHLO, returns a full CHLO in |out| which can pass 213 // Takes a inchoate CHLO, returns a full CHLO in |out| which can pass
214 // |crypto_config|'s validation. 214 // |crypto_config|'s validation.
215 static void GenerateFullCHLO(const CryptoHandshakeMessage& inchoate_chlo, 215 static void GenerateFullCHLO(
216 QuicCryptoServerConfig* crypto_config, 216 const CryptoHandshakeMessage& inchoate_chlo,
217 IPAddress server_ip, 217 QuicCryptoServerConfig* crypto_config,
218 IPEndPoint client_addr, 218 IPAddress server_ip,
219 QuicVersion version, 219 IPEndPoint client_addr,
220 const QuicClock* clock, 220 QuicVersion version,
221 scoped_refptr<QuicCryptoProof> proof, 221 const QuicClock* clock,
222 QuicCompressedCertsCache* compressed_certs_cache, 222 scoped_refptr<QuicSignedServerConfig> signed_config,
223 CryptoHandshakeMessage* out); 223 QuicCompressedCertsCache* compressed_certs_cache,
224 CryptoHandshakeMessage* out);
224 225
225 private: 226 private:
226 static void CompareClientAndServerKeys(QuicCryptoClientStream* client, 227 static void CompareClientAndServerKeys(QuicCryptoClientStream* client,
227 QuicCryptoServerStream* server); 228 QuicCryptoServerStream* server);
228 229
229 // Return a CHLO nonce in hexadecimal. 230 // Return a CHLO nonce in hexadecimal.
230 static std::string GenerateClientNonceHex( 231 static std::string GenerateClientNonceHex(
231 const QuicClock* clock, 232 const QuicClock* clock,
232 QuicCryptoServerConfig* crypto_config); 233 QuicCryptoServerConfig* crypto_config);
233 234
234 // Return a CHLO PUBS in hexadecimal. 235 // Return a CHLO PUBS in hexadecimal.
235 static std::string GenerateClientPublicValuesHex(); 236 static std::string GenerateClientPublicValuesHex();
236 237
237 DISALLOW_COPY_AND_ASSIGN(CryptoTestUtils); 238 DISALLOW_COPY_AND_ASSIGN(CryptoTestUtils);
238 }; 239 };
239 240
240 } // namespace test 241 } // namespace test
241 242
242 } // namespace net 243 } // namespace net
243 244
244 #endif // NET_QUIC_TEST_TOOLS_CRYPTO_TEST_UTILS_H_ 245 #endif // NET_QUIC_TEST_TOOLS_CRYPTO_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « net/quic/quartc/quartc_session_test.cc ('k') | net/quic/test_tools/crypto_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698