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

Side by Side Diff: net/spdy/chromium/spdy_session.cc

Issue 2850033002: Check Expect-CT at connection setup (Closed)
Patch Set: fix CanPool check Created 3 years, 7 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/spdy/chromium/spdy_session.h" 5 #include "net/spdy/chromium/spdy_session.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <utility> 10 #include <utility>
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 ssl_info.cert.get(), TransportSecurityState::DISABLE_PIN_REPORTS, 708 ssl_info.cert.get(), TransportSecurityState::DISABLE_PIN_REPORTS,
709 &pinning_failure_log) == 709 &pinning_failure_log) ==
710 TransportSecurityState::PKPStatus::VIOLATED) { 710 TransportSecurityState::PKPStatus::VIOLATED) {
711 return false; 711 return false;
712 } 712 }
713 713
714 if (ssl_info.ct_cert_policy_compliance != 714 if (ssl_info.ct_cert_policy_compliance !=
715 ct::CertPolicyCompliance::CERT_POLICY_COMPLIES_VIA_SCTS && 715 ct::CertPolicyCompliance::CERT_POLICY_COMPLIES_VIA_SCTS &&
716 ssl_info.ct_cert_policy_compliance != 716 ssl_info.ct_cert_policy_compliance !=
717 ct::CertPolicyCompliance::CERT_POLICY_BUILD_NOT_TIMELY && 717 ct::CertPolicyCompliance::CERT_POLICY_BUILD_NOT_TIMELY &&
718 // As with CheckPublicKeyPins above, disable Expect-CT reports.
718 transport_security_state->ShouldRequireCT( 719 transport_security_state->ShouldRequireCT(
719 new_hostname, ssl_info.cert.get(), ssl_info.public_key_hashes)) { 720 HostPortPair(new_hostname, 0), ssl_info.is_issued_by_known_root,
721 ssl_info.public_key_hashes, ssl_info.cert.get(),
722 ssl_info.unverified_cert.get(),
723 ssl_info.signed_certificate_timestamps,
724 TransportSecurityState::DISABLE_EXPECT_CT_REPORTS)) {
720 return false; 725 return false;
721 } 726 }
722 727
723 return true; 728 return true;
724 } 729 }
725 730
726 SpdySession::SpdySession(const SpdySessionKey& spdy_session_key, 731 SpdySession::SpdySession(const SpdySessionKey& spdy_session_key,
727 HttpServerProperties* http_server_properties, 732 HttpServerProperties* http_server_properties,
728 TransportSecurityState* transport_security_state, 733 TransportSecurityState* transport_security_state,
729 bool enable_sending_initial_data, 734 bool enable_sending_initial_data,
(...skipping 2463 matching lines...) Expand 10 before | Expand all | Expand 10 after
3193 if (!queue->empty()) { 3198 if (!queue->empty()) {
3194 SpdyStreamId stream_id = queue->front(); 3199 SpdyStreamId stream_id = queue->front();
3195 queue->pop_front(); 3200 queue->pop_front();
3196 return stream_id; 3201 return stream_id;
3197 } 3202 }
3198 } 3203 }
3199 return 0; 3204 return 0;
3200 } 3205 }
3201 3206
3202 } // namespace net 3207 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698