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

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

Issue 2097123002: QUIC - Race Cert Verification with host resolution if certs are (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Race cert verification. Created 4 years, 5 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
« no previous file with comments | « net/quic/quic_chromium_client_session.h ('k') | net/quic/quic_chromium_client_stream_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_chromium_client_session.h" 5 #include "net/quic/quic_chromium_client_session.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after
939 } 939 }
940 940
941 bool QuicChromiumClientSession::HasOpenDynamicStreams() const { 941 bool QuicChromiumClientSession::HasOpenDynamicStreams() const {
942 return QuicSession::HasOpenDynamicStreams() || 942 return QuicSession::HasOpenDynamicStreams() ||
943 GetNumDrainingOutgoingStreams() > 0; 943 GetNumDrainingOutgoingStreams() > 0;
944 } 944 }
945 945
946 void QuicChromiumClientSession::OnProofValid( 946 void QuicChromiumClientSession::OnProofValid(
947 const QuicCryptoClientConfig::CachedState& cached) { 947 const QuicCryptoClientConfig::CachedState& cached) {
948 DCHECK(cached.proof_valid()); 948 DCHECK(cached.proof_valid());
949 net_log_.AddEvent(NetLog::TYPE_QUIC_SESSION_PROOF_VALIDATED);
949 950
950 if (!server_info_) { 951 if (!server_info_) {
951 return; 952 return;
952 } 953 }
953 954
954 QuicServerInfo::State* state = server_info_->mutable_state(); 955 QuicServerInfo::State* state = server_info_->mutable_state();
955 956
956 state->server_config = cached.server_config(); 957 state->server_config = cached.server_config();
957 state->source_address_token = cached.source_address_token(); 958 state->source_address_token = cached.source_address_token();
958 state->cert_sct = cached.cert_sct(); 959 state->cert_sct = cached.cert_sct();
959 state->chlo_hash = cached.chlo_hash(); 960 state->chlo_hash = cached.chlo_hash();
960 state->server_config_sig = cached.signature(); 961 state->server_config_sig = cached.signature();
961 state->certs = cached.certs(); 962 state->certs = cached.certs();
962 963
963 server_info_->Persist(); 964 server_info_->Persist();
964 } 965 }
965 966
967 void QuicChromiumClientSession::OnChannelValid() {
968 net_log_.AddEvent(NetLog::TYPE_QUIC_SESSION_CHANNEL_VALIDATED);
969 }
970
966 void QuicChromiumClientSession::OnProofVerifyDetailsAvailable( 971 void QuicChromiumClientSession::OnProofVerifyDetailsAvailable(
967 const ProofVerifyDetails& verify_details) { 972 const ProofVerifyDetails& verify_details) {
968 const ProofVerifyDetailsChromium* verify_details_chromium = 973 const ProofVerifyDetailsChromium* verify_details_chromium =
969 reinterpret_cast<const ProofVerifyDetailsChromium*>(&verify_details); 974 reinterpret_cast<const ProofVerifyDetailsChromium*>(&verify_details);
970 cert_verify_result_.reset( 975 cert_verify_result_.reset(
971 new CertVerifyResult(verify_details_chromium->cert_verify_result)); 976 new CertVerifyResult(verify_details_chromium->cert_verify_result));
972 pinning_failure_log_ = verify_details_chromium->pinning_failure_log; 977 pinning_failure_log_ = verify_details_chromium->pinning_failure_log;
973 std::unique_ptr<ct::CTVerifyResult> ct_verify_result_copy( 978 std::unique_ptr<ct::CTVerifyResult> ct_verify_result_copy(
974 new ct::CTVerifyResult(verify_details_chromium->ct_verify_result)); 979 new ct::CTVerifyResult(verify_details_chromium->ct_verify_result));
975 ct_verify_result_ = std::move(ct_verify_result_copy); 980 ct_verify_result_ = std::move(ct_verify_result_copy);
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
1206 } 1211 }
1207 1212
1208 void QuicChromiumClientSession::DeletePromised( 1213 void QuicChromiumClientSession::DeletePromised(
1209 QuicClientPromisedInfo* promised) { 1214 QuicClientPromisedInfo* promised) {
1210 if (IsOpenStream(promised->id())) 1215 if (IsOpenStream(promised->id()))
1211 streams_pushed_and_claimed_count_++; 1216 streams_pushed_and_claimed_count_++;
1212 QuicClientSessionBase::DeletePromised(promised); 1217 QuicClientSessionBase::DeletePromised(promised);
1213 } 1218 }
1214 1219
1215 } // namespace net 1220 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_chromium_client_session.h ('k') | net/quic/quic_chromium_client_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698