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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
538 // SelectNewPrimaryConfig reevaluates the primary config based on the | 538 // SelectNewPrimaryConfig reevaluates the primary config based on the |
539 // "primary_time" deadlines contained in each. | 539 // "primary_time" deadlines contained in each. |
540 void SelectNewPrimaryConfig(QuicWallTime now) const; | 540 void SelectNewPrimaryConfig(QuicWallTime now) const; |
541 | 541 |
542 // EvaluateClientHello checks |client_hello| for gross errors and determines | 542 // EvaluateClientHello checks |client_hello| for gross errors and determines |
543 // whether it can be shown to be fresh (i.e. not a replay). The results are | 543 // whether it can be shown to be fresh (i.e. not a replay). The results are |
544 // written to |info|. | 544 // written to |info|. |
545 void EvaluateClientHello( | 545 void EvaluateClientHello( |
546 const IPAddress& server_ip, | 546 const IPAddress& server_ip, |
547 QuicVersion version, | 547 QuicVersion version, |
548 const uint8_t* primary_orbit, | |
549 scoped_refptr<Config> requested_config, | 548 scoped_refptr<Config> requested_config, |
550 scoped_refptr<Config> primary_config, | 549 scoped_refptr<Config> primary_config, |
551 QuicCryptoProof* crypto_proof, | 550 QuicCryptoProof* crypto_proof, |
552 scoped_refptr<ValidateClientHelloResultCallback::Result> | 551 scoped_refptr<ValidateClientHelloResultCallback::Result> |
553 client_hello_state, | 552 client_hello_state, |
554 std::unique_ptr<ValidateClientHelloResultCallback> done_cb) const; | 553 std::unique_ptr<ValidateClientHelloResultCallback> done_cb) const; |
555 | 554 |
556 // Callback class for bridging between EvaluateClientHello and | 555 // Callback class for bridging between EvaluateClientHello and |
557 // EvaluateClientHelloAfterGetProof. | 556 // EvaluateClientHelloAfterGetProof. |
558 class EvaluateClientHelloCallback; | 557 class EvaluateClientHelloCallback; |
559 friend class EvaluateClientHelloCallback; | 558 friend class EvaluateClientHelloCallback; |
560 | 559 |
561 // Continuation of EvaluateClientHello after the call to | 560 // Continuation of EvaluateClientHello after the call to |
562 // ProofSource::GetProof. |found_error| indicates whether an error was | 561 // ProofSource::GetProof. |found_error| indicates whether an error was |
563 // detected in EvaluateClientHello, and |get_proof_failed| indicates whether | 562 // detected in EvaluateClientHello, and |get_proof_failed| indicates whether |
564 // GetProof failed. If GetProof was not run, then |get_proof_failed| will be | 563 // GetProof failed. If GetProof was not run, then |get_proof_failed| will be |
565 // set to false. | 564 // set to false. |
566 void EvaluateClientHelloAfterGetProof( | 565 void EvaluateClientHelloAfterGetProof( |
567 bool found_error, | 566 bool found_error, |
568 const IPAddress& server_ip, | 567 const IPAddress& server_ip, |
569 QuicVersion version, | 568 QuicVersion version, |
570 const uint8_t* primary_orbit, | |
571 scoped_refptr<Config> requested_config, | 569 scoped_refptr<Config> requested_config, |
572 scoped_refptr<Config> primary_config, | 570 scoped_refptr<Config> primary_config, |
573 QuicCryptoProof* crypto_proof, | 571 QuicCryptoProof* crypto_proof, |
574 std::unique_ptr<ProofSource::Details> proof_source_details, | 572 std::unique_ptr<ProofSource::Details> proof_source_details, |
575 bool get_proof_failed, | 573 bool get_proof_failed, |
576 scoped_refptr<ValidateClientHelloResultCallback::Result> | 574 scoped_refptr<ValidateClientHelloResultCallback::Result> |
577 client_hello_state, | 575 client_hello_state, |
578 std::unique_ptr<ValidateClientHelloResultCallback> done_cb) const; | 576 std::unique_ptr<ValidateClientHelloResultCallback> done_cb) const; |
579 | 577 |
| 578 // Callback class for bridging between ProcessClientHello and |
| 579 // ProcessClientHelloAfterGetProof. |
| 580 class ProcessClientHelloCallback; |
| 581 friend class ProcessClientHelloCallback; |
| 582 |
580 // Portion of ProcessClientHello which executes after GetProof. | 583 // Portion of ProcessClientHello which executes after GetProof. |
581 void ProcessClientHelloAfterGetProof( | 584 void ProcessClientHelloAfterGetProof( |
| 585 bool found_error, |
582 const ValidateClientHelloResultCallback::Result& validate_chlo_result, | 586 const ValidateClientHelloResultCallback::Result& validate_chlo_result, |
583 bool reject_only, | 587 bool reject_only, |
584 QuicConnectionId connection_id, | 588 QuicConnectionId connection_id, |
585 const IPEndPoint& client_address, | 589 const IPEndPoint& client_address, |
586 QuicVersion version, | 590 QuicVersion version, |
587 const QuicVersionVector& supported_versions, | 591 const QuicVersionVector& supported_versions, |
588 bool use_stateless_rejects, | 592 bool use_stateless_rejects, |
589 QuicConnectionId server_designated_connection_id, | 593 QuicConnectionId server_designated_connection_id, |
590 const QuicClock* clock, | 594 const QuicClock* clock, |
591 QuicRandom* rand, | 595 QuicRandom* rand, |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
847 std::string cert_sct; | 851 std::string cert_sct; |
848 // The server config that is used for this proof (and the rest of the | 852 // The server config that is used for this proof (and the rest of the |
849 // request). | 853 // request). |
850 scoped_refptr<QuicCryptoServerConfig::Config> config; | 854 scoped_refptr<QuicCryptoServerConfig::Config> config; |
851 std::string primary_scid; | 855 std::string primary_scid; |
852 }; | 856 }; |
853 | 857 |
854 } // namespace net | 858 } // namespace net |
855 | 859 |
856 #endif // NET_QUIC_CRYPTO_QUIC_CRYPTO_SERVER_CONFIG_H_ | 860 #endif // NET_QUIC_CRYPTO_QUIC_CRYPTO_SERVER_CONFIG_H_ |
OLD | NEW |