| 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_CORE_CRYPTO_QUIC_CRYPTO_SERVER_CONFIG_H_ | 5 #ifndef NET_QUIC_CORE_CRYPTO_QUIC_CRYPTO_SERVER_CONFIG_H_ |
| 6 #define NET_QUIC_CORE_CRYPTO_QUIC_CRYPTO_SERVER_CONFIG_H_ | 6 #define NET_QUIC_CORE_CRYPTO_QUIC_CRYPTO_SERVER_CONFIG_H_ |
| 7 | 7 |
| 8 #include <cstddef> | 8 #include <cstddef> |
| 9 #include <cstdint> | 9 #include <cstdint> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 QuicConnectionId server_designated_connection_id, | 320 QuicConnectionId server_designated_connection_id, |
| 321 const QuicClock* clock, | 321 const QuicClock* clock, |
| 322 QuicRandom* rand, | 322 QuicRandom* rand, |
| 323 QuicCompressedCertsCache* compressed_certs_cache, | 323 QuicCompressedCertsCache* compressed_certs_cache, |
| 324 QuicReferenceCountedPointer<QuicCryptoNegotiatedParameters> params, | 324 QuicReferenceCountedPointer<QuicCryptoNegotiatedParameters> params, |
| 325 QuicReferenceCountedPointer<QuicSignedServerConfig> crypto_proof, | 325 QuicReferenceCountedPointer<QuicSignedServerConfig> crypto_proof, |
| 326 QuicByteCount total_framing_overhead, | 326 QuicByteCount total_framing_overhead, |
| 327 QuicByteCount chlo_packet_size, | 327 QuicByteCount chlo_packet_size, |
| 328 std::unique_ptr<ProcessClientHelloResultCallback> done_cb) const; | 328 std::unique_ptr<ProcessClientHelloResultCallback> done_cb) const; |
| 329 | 329 |
| 330 // BuildServerConfigUpdateMessage sets |out| to be a SCUP message containing | |
| 331 // the current primary config, an up to date source-address token, and cert | |
| 332 // chain and proof in the case of secure QUIC. Returns true if successfully | |
| 333 // filled |out|. | |
| 334 // | |
| 335 // |cached_network_params| is optional, and can be nullptr. | |
| 336 // | |
| 337 // TODO(gredner): remove this when | |
| 338 // FLAGS_quic_reloadable_flag_enable_async_get_proof is removed. | |
| 339 bool BuildServerConfigUpdateMessage( | |
| 340 QuicVersion version, | |
| 341 base::StringPiece chlo_hash, | |
| 342 const SourceAddressTokens& previous_source_address_tokens, | |
| 343 const QuicSocketAddress& server_address, | |
| 344 const QuicIpAddress& client_ip, | |
| 345 const QuicClock* clock, | |
| 346 QuicRandom* rand, | |
| 347 QuicCompressedCertsCache* compressed_certs_cache, | |
| 348 const QuicCryptoNegotiatedParameters& params, | |
| 349 const CachedNetworkParameters* cached_network_params, | |
| 350 const QuicTagVector& connection_options, | |
| 351 CryptoHandshakeMessage* out) const; | |
| 352 | |
| 353 // BuildServerConfigUpdateMessage invokes |cb| with a SCUP message containing | 330 // BuildServerConfigUpdateMessage invokes |cb| with a SCUP message containing |
| 354 // the current primary config, an up to date source-address token, and cert | 331 // the current primary config, an up to date source-address token, and cert |
| 355 // chain and proof in the case of secure QUIC. Passes true to |cb| if the | 332 // chain and proof in the case of secure QUIC. Passes true to |cb| if the |
| 356 // message was generated successfully, and false otherwise. This method | 333 // message was generated successfully, and false otherwise. This method |
| 357 // assumes ownership of |cb|. | 334 // assumes ownership of |cb|. |
| 358 // | 335 // |
| 359 // |cached_network_params| is optional, and can be nullptr. | 336 // |cached_network_params| is optional, and can be nullptr. |
| 360 // | |
| 361 // TODO(gredner): This method is an async version of the above. The | |
| 362 // synchronous version will eventually be removed. | |
| 363 void BuildServerConfigUpdateMessage( | 337 void BuildServerConfigUpdateMessage( |
| 364 QuicVersion version, | 338 QuicVersion version, |
| 365 base::StringPiece chlo_hash, | 339 base::StringPiece chlo_hash, |
| 366 const SourceAddressTokens& previous_source_address_tokens, | 340 const SourceAddressTokens& previous_source_address_tokens, |
| 367 const QuicSocketAddress& server_address, | 341 const QuicSocketAddress& server_address, |
| 368 const QuicIpAddress& client_ip, | 342 const QuicIpAddress& client_ip, |
| 369 const QuicClock* clock, | 343 const QuicClock* clock, |
| 370 QuicRandom* rand, | 344 QuicRandom* rand, |
| 371 QuicCompressedCertsCache* compressed_certs_cache, | 345 QuicCompressedCertsCache* compressed_certs_cache, |
| 372 const QuicCryptoNegotiatedParameters& params, | 346 const QuicCryptoNegotiatedParameters& params, |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 796 QuicReferenceCountedPointer<QuicCryptoServerConfig::Config> config; | 770 QuicReferenceCountedPointer<QuicCryptoServerConfig::Config> config; |
| 797 std::string primary_scid; | 771 std::string primary_scid; |
| 798 | 772 |
| 799 protected: | 773 protected: |
| 800 ~QuicSignedServerConfig() override; | 774 ~QuicSignedServerConfig() override; |
| 801 }; | 775 }; |
| 802 | 776 |
| 803 } // namespace net | 777 } // namespace net |
| 804 | 778 |
| 805 #endif // NET_QUIC_CORE_CRYPTO_QUIC_CRYPTO_SERVER_CONFIG_H_ | 779 #endif // NET_QUIC_CORE_CRYPTO_QUIC_CRYPTO_SERVER_CONFIG_H_ |
| OLD | NEW |