Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Side by Side Diff: net/quic/quic_client_session.cc

Issue 436753002: Extend ProofVerifierChromium and ProofVerifyDetailsChromium. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove an unneeded member of ProofVerifierChromium Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_client_session.h" 5 #include "net/quic/quic_client_session.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/metrics/sparse_histogram.h" 10 #include "base/metrics/sparse_histogram.h"
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 421
422 ssl_info->public_key_hashes = cert_verify_result_->public_key_hashes; 422 ssl_info->public_key_hashes = cert_verify_result_->public_key_hashes;
423 ssl_info->is_issued_by_known_root = 423 ssl_info->is_issued_by_known_root =
424 cert_verify_result_->is_issued_by_known_root; 424 cert_verify_result_->is_issued_by_known_root;
425 425
426 ssl_info->connection_status = ssl_connection_status; 426 ssl_info->connection_status = ssl_connection_status;
427 ssl_info->client_cert_sent = false; 427 ssl_info->client_cert_sent = false;
428 ssl_info->channel_id_sent = crypto_stream_->WasChannelIDSent(); 428 ssl_info->channel_id_sent = crypto_stream_->WasChannelIDSent();
429 ssl_info->security_bits = security_bits; 429 ssl_info->security_bits = security_bits;
430 ssl_info->handshake_type = SSLInfo::HANDSHAKE_FULL; 430 ssl_info->handshake_type = SSLInfo::HANDSHAKE_FULL;
431 ssl_info->pinning_failure_log = pinning_failure_log_;
431 return true; 432 return true;
432 } 433 }
433 434
434 int QuicClientSession::CryptoConnect(bool require_confirmation, 435 int QuicClientSession::CryptoConnect(bool require_confirmation,
435 const CompletionCallback& callback) { 436 const CompletionCallback& callback) {
436 require_confirmation_ = require_confirmation; 437 require_confirmation_ = require_confirmation;
437 handshake_start_ = base::TimeTicks::Now(); 438 handshake_start_ = base::TimeTicks::Now();
438 RecordHandshakeState(STATE_STARTED); 439 RecordHandshakeState(STATE_STARTED);
439 DCHECK(flow_controller()); 440 DCHECK(flow_controller());
440 if (!crypto_stream_->CryptoConnect()) { 441 if (!crypto_stream_->CryptoConnect()) {
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 state->server_config = cached.server_config(); 661 state->server_config = cached.server_config();
661 state->source_address_token = cached.source_address_token(); 662 state->source_address_token = cached.source_address_token();
662 state->server_config_sig = cached.signature(); 663 state->server_config_sig = cached.signature();
663 state->certs = cached.certs(); 664 state->certs = cached.certs();
664 665
665 server_info_->Persist(); 666 server_info_->Persist();
666 } 667 }
667 668
668 void QuicClientSession::OnProofVerifyDetailsAvailable( 669 void QuicClientSession::OnProofVerifyDetailsAvailable(
669 const ProofVerifyDetails& verify_details) { 670 const ProofVerifyDetails& verify_details) {
670 const CertVerifyResult* cert_verify_result_other = 671 const ProofVerifyDetailsChromium* verify_details_chromium =
671 &(reinterpret_cast<const ProofVerifyDetailsChromium*>( 672 reinterpret_cast<const ProofVerifyDetailsChromium*>(&verify_details);
672 &verify_details))->cert_verify_result;
673 CertVerifyResult* result_copy = new CertVerifyResult; 673 CertVerifyResult* result_copy = new CertVerifyResult;
674 result_copy->CopyFrom(*cert_verify_result_other); 674 result_copy->CopyFrom(verify_details_chromium->cert_verify_result);
675 cert_verify_result_.reset(result_copy); 675 cert_verify_result_.reset(result_copy);
676 pinning_failure_log_ = verify_details_chromium->pinning_failure_log;
676 logger_.OnCertificateVerified(*cert_verify_result_); 677 logger_.OnCertificateVerified(*cert_verify_result_);
677 } 678 }
678 679
679 void QuicClientSession::StartReading() { 680 void QuicClientSession::StartReading() {
680 if (read_pending_) { 681 if (read_pending_) {
681 return; 682 return;
682 } 683 }
683 read_pending_ = true; 684 read_pending_ = true;
684 int rv = socket_->Read(read_buffer_.get(), 685 int rv = socket_->Read(read_buffer_.get(),
685 read_buffer_->size(), 686 read_buffer_->size(),
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 return; 857 return;
857 858
858 // TODO(rch): re-enable this code once beta is cut. 859 // TODO(rch): re-enable this code once beta is cut.
859 // if (stream_factory_) 860 // if (stream_factory_)
860 // stream_factory_->OnSessionConnectTimeout(this); 861 // stream_factory_->OnSessionConnectTimeout(this);
861 // CloseAllStreams(ERR_QUIC_HANDSHAKE_FAILED); 862 // CloseAllStreams(ERR_QUIC_HANDSHAKE_FAILED);
862 // DCHECK_EQ(0u, GetNumOpenStreams()); 863 // DCHECK_EQ(0u, GetNumOpenStreams());
863 } 864 }
864 865
865 } // namespace net 866 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698