OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "net/quic/quic_crypto_client_stream.h" | 5 #include "net/quic/quic_crypto_client_stream.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
574 return status; | 574 return status; |
575 } | 575 } |
576 | 576 |
577 void QuicCryptoClientStream::DoGetChannelIDComplete() { | 577 void QuicCryptoClientStream::DoGetChannelIDComplete() { |
578 if (!channel_id_key_.get()) { | 578 if (!channel_id_key_.get()) { |
579 next_state_ = STATE_NONE; | 579 next_state_ = STATE_NONE; |
580 CloseConnectionWithDetails(QUIC_INVALID_CHANNEL_ID_SIGNATURE, | 580 CloseConnectionWithDetails(QUIC_INVALID_CHANNEL_ID_SIGNATURE, |
581 "Channel ID lookup failed"); | 581 "Channel ID lookup failed"); |
582 return; | 582 return; |
583 } | 583 } |
| 584 proof_handler_->OnChannelValid(); |
584 next_state_ = STATE_SEND_CHLO; | 585 next_state_ = STATE_SEND_CHLO; |
585 } | 586 } |
586 | 587 |
587 void QuicCryptoClientStream::DoReceiveSHLO( | 588 void QuicCryptoClientStream::DoReceiveSHLO( |
588 const CryptoHandshakeMessage* in, | 589 const CryptoHandshakeMessage* in, |
589 QuicCryptoClientConfig::CachedState* cached) { | 590 QuicCryptoClientConfig::CachedState* cached) { |
590 next_state_ = STATE_NONE; | 591 next_state_ = STATE_NONE; |
591 // We sent a CHLO that we expected to be accepted and now we're | 592 // We sent a CHLO that we expected to be accepted and now we're |
592 // hoping for a SHLO from the server to confirm that. First check | 593 // hoping for a SHLO from the server to confirm that. First check |
593 // to see whether the response was a reject, and if so, move on to | 594 // to see whether the response was a reject, and if so, move on to |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
696 } | 697 } |
697 for (size_t i = 0; i < num_their_proof_demands; i++) { | 698 for (size_t i = 0; i < num_their_proof_demands; i++) { |
698 if (their_proof_demands[i] == kCHID) { | 699 if (their_proof_demands[i] == kCHID) { |
699 return true; | 700 return true; |
700 } | 701 } |
701 } | 702 } |
702 return false; | 703 return false; |
703 } | 704 } |
704 | 705 |
705 } // namespace net | 706 } // namespace net |
OLD | NEW |