OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_QUIC_CRYPTO_SERVER_CONFIG_PEER_H_ | 5 #ifndef NET_QUIC_TEST_TOOLS_QUIC_CRYPTO_SERVER_CONFIG_PEER_H_ |
6 #define NET_QUIC_TEST_TOOLS_QUIC_CRYPTO_SERVER_CONFIG_PEER_H_ | 6 #define NET_QUIC_TEST_TOOLS_QUIC_CRYPTO_SERVER_CONFIG_PEER_H_ |
7 | 7 |
8 #include "net/quic/core/crypto/quic_crypto_server_config.h" | 8 #include "net/quic/core/crypto/quic_crypto_server_config.h" |
9 | 9 |
10 namespace net { | 10 namespace net { |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 | 49 |
50 // Attempts to validate the single source address token in |token|. | 50 // Attempts to validate the single source address token in |token|. |
51 HandshakeFailureReason ValidateSingleSourceAddressToken( | 51 HandshakeFailureReason ValidateSingleSourceAddressToken( |
52 base::StringPiece token, | 52 base::StringPiece token, |
53 const IPAddress& ip, | 53 const IPAddress& ip, |
54 QuicWallTime now); | 54 QuicWallTime now); |
55 | 55 |
56 // Returns a new server nonce. | 56 // Returns a new server nonce. |
57 std::string NewServerNonce(QuicRandom* rand, QuicWallTime now) const; | 57 std::string NewServerNonce(QuicRandom* rand, QuicWallTime now) const; |
58 | 58 |
59 // Check if |nonce| is valid |now|. | |
60 HandshakeFailureReason ValidateServerNonce(base::StringPiece nonce, | |
61 QuicWallTime now); | |
62 | |
63 // Returns the mutex needed to access the strike register client. | |
64 base::Lock* GetStrikeRegisterClientLock(); | |
65 | |
66 // CheckConfigs compares the state of the Configs in |server_config_| to the | 59 // CheckConfigs compares the state of the Configs in |server_config_| to the |
67 // description given as arguments. The arguments are given as | 60 // description given as arguments. The arguments are given as |
68 // nullptr-terminated std:pairs. The first of each std:pair is the server | 61 // nullptr-terminated std:pairs. The first of each std:pair is the server |
69 // config ID of | 62 // config ID of |
70 // a Config. The second is a boolean describing whether the config is the | 63 // a Config. The second is a boolean describing whether the config is the |
71 // primary. For example: | 64 // primary. For example: |
72 // CheckConfigs(nullptr); // checks that no Configs are loaded. | 65 // CheckConfigs(nullptr); // checks that no Configs are loaded. |
73 // | 66 // |
74 // // Checks that exactly three Configs are loaded with the given IDs and | 67 // // Checks that exactly three Configs are loaded with the given IDs and |
75 // // status. | 68 // // status. |
(...skipping 15 matching lines...) Expand all Loading... |
91 QuicCompressedCertsCache* compressed_certs_cache, | 84 QuicCompressedCertsCache* compressed_certs_cache, |
92 const scoped_refptr<ProofSource::Chain>& chain, | 85 const scoped_refptr<ProofSource::Chain>& chain, |
93 const std::string& client_common_set_hashes, | 86 const std::string& client_common_set_hashes, |
94 const std::string& client_cached_cert_hashes, | 87 const std::string& client_cached_cert_hashes, |
95 const CommonCertSets* common_sets); | 88 const CommonCertSets* common_sets); |
96 | 89 |
97 uint32_t source_address_token_future_secs(); | 90 uint32_t source_address_token_future_secs(); |
98 | 91 |
99 uint32_t source_address_token_lifetime_secs(); | 92 uint32_t source_address_token_lifetime_secs(); |
100 | 93 |
101 uint32_t server_nonce_strike_register_max_entries(); | |
102 | |
103 uint32_t server_nonce_strike_register_window_secs(); | |
104 | |
105 private: | 94 private: |
106 const QuicCryptoServerConfig* server_config_; | 95 const QuicCryptoServerConfig* server_config_; |
107 }; | 96 }; |
108 | 97 |
109 } // namespace test | 98 } // namespace test |
110 } // namespace net | 99 } // namespace net |
111 | 100 |
112 #endif // NET_QUIC_TEST_TOOLS_QUIC_CRYPTO_SERVER_CONFIG_PEER_H_ | 101 #endif // NET_QUIC_TEST_TOOLS_QUIC_CRYPTO_SERVER_CONFIG_PEER_H_ |
OLD | NEW |