| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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_QUIC_CRYPTO_SERVER_CONFIG_H_ | 5 #ifndef NET_QUIC_CRYPTO_QUIC_CRYPTO_SERVER_CONFIG_H_ |
| 6 #define NET_QUIC_CRYPTO_QUIC_CRYPTO_SERVER_CONFIG_H_ | 6 #define NET_QUIC_CRYPTO_QUIC_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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 // SetConfigs takes a vector of config protobufs and the current time. | 127 // SetConfigs takes a vector of config protobufs and the current time. |
| 128 // Configs are assumed to be uniquely identified by their server config ID. | 128 // Configs are assumed to be uniquely identified by their server config ID. |
| 129 // Previously unknown configs are added and possibly made the primary config | 129 // Previously unknown configs are added and possibly made the primary config |
| 130 // depending on their |primary_time| and the value of |now|. Configs that are | 130 // depending on their |primary_time| and the value of |now|. Configs that are |
| 131 // known, but are missing from the protobufs are deleted, unless they are | 131 // known, but are missing from the protobufs are deleted, unless they are |
| 132 // currently the primary config. SetConfigs returns false if any errors were | 132 // currently the primary config. SetConfigs returns false if any errors were |
| 133 // encountered and no changes to the QuicCryptoServerConfig will occur. | 133 // encountered and no changes to the QuicCryptoServerConfig will occur. |
| 134 bool SetConfigs(const std::vector<QuicServerConfigProtobuf*>& protobufs, | 134 bool SetConfigs(const std::vector<QuicServerConfigProtobuf*>& protobufs, |
| 135 QuicWallTime now); | 135 QuicWallTime now); |
| 136 | 136 |
| 137 // Get the server config ids for all known configs. |
| 138 void GetConfigIds(std::vector<std::string>* scids) const; |
| 139 |
| 137 // Checks |client_hello| for gross errors and determines whether it | 140 // Checks |client_hello| for gross errors and determines whether it |
| 138 // can be shown to be fresh (i.e. not a replay). The result of the | 141 // can be shown to be fresh (i.e. not a replay). The result of the |
| 139 // validation step must be interpreted by calling | 142 // validation step must be interpreted by calling |
| 140 // QuicCryptoServerConfig::ProcessClientHello from the done_cb. | 143 // QuicCryptoServerConfig::ProcessClientHello from the done_cb. |
| 141 // | 144 // |
| 142 // ValidateClientHello may invoke the done_cb before unrolling the | 145 // ValidateClientHello may invoke the done_cb before unrolling the |
| 143 // stack if it is able to assess the validity of the client_nonce | 146 // stack if it is able to assess the validity of the client_nonce |
| 144 // without asynchronous operations. | 147 // without asynchronous operations. |
| 145 // | 148 // |
| 146 // client_hello: the incoming client hello message. | 149 // client_hello: the incoming client hello message. |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 uint32 strike_register_window_secs_; | 426 uint32 strike_register_window_secs_; |
| 424 uint32 source_address_token_future_secs_; | 427 uint32 source_address_token_future_secs_; |
| 425 uint32 source_address_token_lifetime_secs_; | 428 uint32 source_address_token_lifetime_secs_; |
| 426 uint32 server_nonce_strike_register_max_entries_; | 429 uint32 server_nonce_strike_register_max_entries_; |
| 427 uint32 server_nonce_strike_register_window_secs_; | 430 uint32 server_nonce_strike_register_window_secs_; |
| 428 }; | 431 }; |
| 429 | 432 |
| 430 } // namespace net | 433 } // namespace net |
| 431 | 434 |
| 432 #endif // NET_QUIC_CRYPTO_QUIC_CRYPTO_SERVER_CONFIG_H_ | 435 #endif // NET_QUIC_CRYPTO_QUIC_CRYPTO_SERVER_CONFIG_H_ |
| OLD | NEW |