OLD | NEW |
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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 | 218 |
219 // Takes a inchoate CHLO, returns a full CHLO in |out| which can pass | 219 // Takes a inchoate CHLO, returns a full CHLO in |out| which can pass |
220 // |crypto_config|'s validation. | 220 // |crypto_config|'s validation. |
221 static void GenerateFullCHLO( | 221 static void GenerateFullCHLO( |
222 const CryptoHandshakeMessage& inchoate_chlo, | 222 const CryptoHandshakeMessage& inchoate_chlo, |
223 QuicCryptoServerConfig* crypto_config, | 223 QuicCryptoServerConfig* crypto_config, |
224 QuicSocketAddress server_addr, | 224 QuicSocketAddress server_addr, |
225 QuicSocketAddress client_addr, | 225 QuicSocketAddress client_addr, |
226 QuicVersion version, | 226 QuicVersion version, |
227 const QuicClock* clock, | 227 const QuicClock* clock, |
228 scoped_refptr<QuicSignedServerConfig> signed_config, | 228 QuicReferenceCountedPointer<QuicSignedServerConfig> signed_config, |
229 QuicCompressedCertsCache* compressed_certs_cache, | 229 QuicCompressedCertsCache* compressed_certs_cache, |
230 CryptoHandshakeMessage* out); | 230 CryptoHandshakeMessage* out); |
231 | 231 |
232 private: | 232 private: |
233 static void CompareClientAndServerKeys(QuicCryptoClientStream* client, | 233 static void CompareClientAndServerKeys(QuicCryptoClientStream* client, |
234 QuicCryptoServerStream* server); | 234 QuicCryptoServerStream* server); |
235 | 235 |
236 // Return a CHLO nonce in hexadecimal. | 236 // Return a CHLO nonce in hexadecimal. |
237 static std::string GenerateClientNonceHex( | 237 static std::string GenerateClientNonceHex( |
238 const QuicClock* clock, | 238 const QuicClock* clock, |
239 QuicCryptoServerConfig* crypto_config); | 239 QuicCryptoServerConfig* crypto_config); |
240 | 240 |
241 // Return a CHLO PUBS in hexadecimal. | 241 // Return a CHLO PUBS in hexadecimal. |
242 static std::string GenerateClientPublicValuesHex(); | 242 static std::string GenerateClientPublicValuesHex(); |
243 | 243 |
244 DISALLOW_COPY_AND_ASSIGN(CryptoTestUtils); | 244 DISALLOW_COPY_AND_ASSIGN(CryptoTestUtils); |
245 }; | 245 }; |
246 | 246 |
247 } // namespace test | 247 } // namespace test |
248 | 248 |
249 } // namespace net | 249 } // namespace net |
250 | 250 |
251 #endif // NET_QUIC_TEST_TOOLS_CRYPTO_TEST_UTILS_H_ | 251 #endif // NET_QUIC_TEST_TOOLS_CRYPTO_TEST_UTILS_H_ |
OLD | NEW |