OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_CRYPTO_CRYPTO_SERVER_CONFIG_H_ | 5 #ifndef NET_QUIC_CRYPTO_CRYPTO_SERVER_CONFIG_H_ |
6 #define NET_QUIC_CRYPTO_CRYPTO_SERVER_CONFIG_H_ | 6 #define NET_QUIC_CRYPTO_CRYPTO_SERVER_CONFIG_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 // per-connection. | 148 // per-connection. |
149 void SetEphemeralKeySource(EphemeralKeySource* ephemeral_key_source); | 149 void SetEphemeralKeySource(EphemeralKeySource* ephemeral_key_source); |
150 | 150 |
151 // set_replay_protection controls whether replay protection is enabled. If | 151 // set_replay_protection controls whether replay protection is enabled. If |
152 // replay protection is disabled then no strike registers are needed and | 152 // replay protection is disabled then no strike registers are needed and |
153 // frontends can share an orbit value without a shared strike-register. | 153 // frontends can share an orbit value without a shared strike-register. |
154 // However, an attacker can duplicate a handshake and cause a client's | 154 // However, an attacker can duplicate a handshake and cause a client's |
155 // request to be processed twice. | 155 // request to be processed twice. |
156 void set_replay_protection(bool on); | 156 void set_replay_protection(bool on); |
157 | 157 |
| 158 // set_strike_register_no_startup_period configures the strike register to |
| 159 // not have a startup period. |
| 160 void set_strike_register_no_startup_period(); |
| 161 |
158 // set_strike_register_max_entries sets the maximum number of entries that | 162 // set_strike_register_max_entries sets the maximum number of entries that |
159 // the internal strike register will hold. If the strike register fills up | 163 // the internal strike register will hold. If the strike register fills up |
160 // then the oldest entries (by the client's clock) will be dropped. | 164 // then the oldest entries (by the client's clock) will be dropped. |
161 void set_strike_register_max_entries(uint32 max_entries); | 165 void set_strike_register_max_entries(uint32 max_entries); |
162 | 166 |
163 // set_strike_register_window_secs sets the number of seconds around the | 167 // set_strike_register_window_secs sets the number of seconds around the |
164 // current time that the strike register will attempt to be authoritative | 168 // current time that the strike register will attempt to be authoritative |
165 // for. Setting a larger value allows for greater client clock-skew, but | 169 // for. Setting a larger value allows for greater client clock-skew, but |
166 // means that the quiescent startup period must be longer. | 170 // means that the quiescent startup period must be longer. |
167 void set_strike_register_window_secs(uint32 window_secs); | 171 void set_strike_register_window_secs(uint32 window_secs); |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 // proof_source_ contains an object that can provide certificate chains and | 348 // proof_source_ contains an object that can provide certificate chains and |
345 // signatures. | 349 // signatures. |
346 scoped_ptr<ProofSource> proof_source_; | 350 scoped_ptr<ProofSource> proof_source_; |
347 | 351 |
348 // ephemeral_key_source_ contains an object that caches ephemeral keys for a | 352 // ephemeral_key_source_ contains an object that caches ephemeral keys for a |
349 // short period of time. | 353 // short period of time. |
350 scoped_ptr<EphemeralKeySource> ephemeral_key_source_; | 354 scoped_ptr<EphemeralKeySource> ephemeral_key_source_; |
351 | 355 |
352 // These fields store configuration values. See the comments for their | 356 // These fields store configuration values. See the comments for their |
353 // respective setter functions. | 357 // respective setter functions. |
| 358 bool strike_register_no_startup_period_; |
354 uint32 strike_register_max_entries_; | 359 uint32 strike_register_max_entries_; |
355 uint32 strike_register_window_secs_; | 360 uint32 strike_register_window_secs_; |
356 uint32 source_address_token_future_secs_; | 361 uint32 source_address_token_future_secs_; |
357 uint32 source_address_token_lifetime_secs_; | 362 uint32 source_address_token_lifetime_secs_; |
358 uint32 server_nonce_strike_register_max_entries_; | 363 uint32 server_nonce_strike_register_max_entries_; |
359 uint32 server_nonce_strike_register_window_secs_; | 364 uint32 server_nonce_strike_register_window_secs_; |
360 }; | 365 }; |
361 | 366 |
362 } // namespace net | 367 } // namespace net |
363 | 368 |
364 #endif // NET_QUIC_CRYPTO_CRYPTO_SERVER_CONFIG_H_ | 369 #endif // NET_QUIC_CRYPTO_CRYPTO_SERVER_CONFIG_H_ |
OLD | NEW |