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

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

Issue 2016143002: Expose when PKP is bypassed in SSLInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make CertVerifyResult Great Again. Created 4 years, 6 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
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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 QuicClientPushPromiseIndex* push_promise_index, 218 QuicClientPushPromiseIndex* push_promise_index,
219 base::TaskRunner* task_runner, 219 base::TaskRunner* task_runner,
220 std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher, 220 std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher,
221 NetLog* net_log) 221 NetLog* net_log)
222 : QuicClientSessionBase(connection, push_promise_index, config), 222 : QuicClientSessionBase(connection, push_promise_index, config),
223 server_id_(server_id), 223 server_id_(server_id),
224 require_confirmation_(false), 224 require_confirmation_(false),
225 stream_factory_(stream_factory), 225 stream_factory_(stream_factory),
226 transport_security_state_(transport_security_state), 226 transport_security_state_(transport_security_state),
227 server_info_(std::move(server_info)), 227 server_info_(std::move(server_info)),
228 pkp_bypassed_(false),
228 num_total_streams_(0), 229 num_total_streams_(0),
229 task_runner_(task_runner), 230 task_runner_(task_runner),
230 net_log_(BoundNetLog::Make(net_log, NetLog::SOURCE_QUIC_SESSION)), 231 net_log_(BoundNetLog::Make(net_log, NetLog::SOURCE_QUIC_SESSION)),
231 dns_resolution_end_time_(dns_resolution_end_time), 232 dns_resolution_end_time_(dns_resolution_end_time),
232 logger_(new QuicConnectionLogger(this, 233 logger_(new QuicConnectionLogger(this,
233 connection_description, 234 connection_description,
234 std::move(socket_performance_watcher), 235 std::move(socket_performance_watcher),
235 net_log_)), 236 net_log_)),
236 going_away_(false), 237 going_away_(false),
237 port_migration_detected_(false), 238 port_migration_detected_(false),
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 } 548 }
548 int ssl_connection_status = 0; 549 int ssl_connection_status = 0;
549 ssl_connection_status |= cipher_suite; 550 ssl_connection_status |= cipher_suite;
550 ssl_connection_status |= 551 ssl_connection_status |=
551 (SSL_CONNECTION_VERSION_QUIC & SSL_CONNECTION_VERSION_MASK) 552 (SSL_CONNECTION_VERSION_QUIC & SSL_CONNECTION_VERSION_MASK)
552 << SSL_CONNECTION_VERSION_SHIFT; 553 << SSL_CONNECTION_VERSION_SHIFT;
553 554
554 ssl_info->public_key_hashes = cert_verify_result_->public_key_hashes; 555 ssl_info->public_key_hashes = cert_verify_result_->public_key_hashes;
555 ssl_info->is_issued_by_known_root = 556 ssl_info->is_issued_by_known_root =
556 cert_verify_result_->is_issued_by_known_root; 557 cert_verify_result_->is_issued_by_known_root;
558 ssl_info->pkp_bypassed = pkp_bypassed_;
557 559
558 ssl_info->connection_status = ssl_connection_status; 560 ssl_info->connection_status = ssl_connection_status;
559 ssl_info->client_cert_sent = false; 561 ssl_info->client_cert_sent = false;
560 ssl_info->channel_id_sent = crypto_stream_->WasChannelIDSent(); 562 ssl_info->channel_id_sent = crypto_stream_->WasChannelIDSent();
561 ssl_info->security_bits = security_bits; 563 ssl_info->security_bits = security_bits;
562 ssl_info->handshake_type = SSLInfo::HANDSHAKE_FULL; 564 ssl_info->handshake_type = SSLInfo::HANDSHAKE_FULL;
563 ssl_info->pinning_failure_log = pinning_failure_log_; 565 ssl_info->pinning_failure_log = pinning_failure_log_;
564 566
565 ssl_info->UpdateCertificateTransparencyInfo(*ct_verify_result_); 567 ssl_info->UpdateCertificateTransparencyInfo(*ct_verify_result_);
566 568
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
960 const ProofVerifyDetails& verify_details) { 962 const ProofVerifyDetails& verify_details) {
961 const ProofVerifyDetailsChromium* verify_details_chromium = 963 const ProofVerifyDetailsChromium* verify_details_chromium =
962 reinterpret_cast<const ProofVerifyDetailsChromium*>(&verify_details); 964 reinterpret_cast<const ProofVerifyDetailsChromium*>(&verify_details);
963 cert_verify_result_.reset(new CertVerifyResult); 965 cert_verify_result_.reset(new CertVerifyResult);
964 cert_verify_result_->CopyFrom(verify_details_chromium->cert_verify_result); 966 cert_verify_result_->CopyFrom(verify_details_chromium->cert_verify_result);
965 pinning_failure_log_ = verify_details_chromium->pinning_failure_log; 967 pinning_failure_log_ = verify_details_chromium->pinning_failure_log;
966 std::unique_ptr<ct::CTVerifyResult> ct_verify_result_copy( 968 std::unique_ptr<ct::CTVerifyResult> ct_verify_result_copy(
967 new ct::CTVerifyResult(verify_details_chromium->ct_verify_result)); 969 new ct::CTVerifyResult(verify_details_chromium->ct_verify_result));
968 ct_verify_result_ = std::move(ct_verify_result_copy); 970 ct_verify_result_ = std::move(ct_verify_result_copy);
969 logger_->OnCertificateVerified(*cert_verify_result_); 971 logger_->OnCertificateVerified(*cert_verify_result_);
972 pkp_bypassed_ = verify_details_chromium->pkp_bypassed;
970 } 973 }
971 974
972 void QuicChromiumClientSession::StartReading() { 975 void QuicChromiumClientSession::StartReading() {
973 for (auto& packet_reader : packet_readers_) { 976 for (auto& packet_reader : packet_readers_) {
974 packet_reader->StartReading(); 977 packet_reader->StartReading();
975 } 978 }
976 } 979 }
977 980
978 void QuicChromiumClientSession::CloseSessionOnError(int error, 981 void QuicChromiumClientSession::CloseSessionOnError(int error,
979 QuicErrorCode quic_error) { 982 QuicErrorCode quic_error) {
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
1198 } 1201 }
1199 1202
1200 void QuicChromiumClientSession::DeletePromised( 1203 void QuicChromiumClientSession::DeletePromised(
1201 QuicClientPromisedInfo* promised) { 1204 QuicClientPromisedInfo* promised) {
1202 if (IsOpenStream(promised->id())) 1205 if (IsOpenStream(promised->id()))
1203 streams_pushed_and_claimed_count_++; 1206 streams_pushed_and_claimed_count_++;
1204 QuicClientSessionBase::DeletePromised(promised); 1207 QuicClientSessionBase::DeletePromised(promised);
1205 } 1208 }
1206 1209
1207 } // namespace net 1210 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698