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