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

Side by Side Diff: net/http/transport_security_state.cc

Issue 2737583002: Gate pinning on |GOOGLE_CHROME_BUILD|. (Closed)
Patch Set: Created 3 years, 9 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 | « no previous file | no next file » | 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/http/transport_security_state.h" 5 #include "net/http/transport_security_state.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <memory> 8 #include <memory>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 } // namespace 722 } // namespace
723 723
724 TransportSecurityState::TransportSecurityState() 724 TransportSecurityState::TransportSecurityState()
725 : enable_static_pins_(true), 725 : enable_static_pins_(true),
726 enable_static_expect_ct_(true), 726 enable_static_expect_ct_(true),
727 enable_static_expect_staple_(true), 727 enable_static_expect_staple_(true),
728 enable_pkp_bypass_for_local_trust_anchors_(true), 728 enable_pkp_bypass_for_local_trust_anchors_(true),
729 sent_reports_cache_(kMaxHPKPReportCacheEntries) { 729 sent_reports_cache_(kMaxHPKPReportCacheEntries) {
730 // Static pinning is only enabled for official builds to make sure that 730 // Static pinning is only enabled for official builds to make sure that
731 // others don't end up with pins that cannot be easily updated. 731 // others don't end up with pins that cannot be easily updated.
732 #if !defined(OFFICIAL_BUILD) || defined(OS_ANDROID) || defined(OS_IOS) 732 #if !defined(GOOGLE_CHROME_BUILD) || defined(OS_ANDROID) || defined(OS_IOS)
733 enable_static_pins_ = false; 733 enable_static_pins_ = false;
734 enable_static_expect_ct_ = false; 734 enable_static_expect_ct_ = false;
735 #endif 735 #endif
736 DCHECK(CalledOnValidThread()); 736 DCHECK(CalledOnValidThread());
737 } 737 }
738 738
739 // Both HSTS and HPKP cause fatal SSL errors, so return true if a 739 // Both HSTS and HPKP cause fatal SSL errors, so return true if a
740 // host has either. 740 // host has either.
741 bool TransportSecurityState::ShouldSSLErrorsBeFatal(const std::string& host) { 741 bool TransportSecurityState::ShouldSSLErrorsBeFatal(const std::string& host) {
742 STSState sts_state; 742 STSState sts_state;
(...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after
1654 TransportSecurityState::PKPStateIterator::PKPStateIterator( 1654 TransportSecurityState::PKPStateIterator::PKPStateIterator(
1655 const TransportSecurityState& state) 1655 const TransportSecurityState& state)
1656 : iterator_(state.enabled_pkp_hosts_.begin()), 1656 : iterator_(state.enabled_pkp_hosts_.begin()),
1657 end_(state.enabled_pkp_hosts_.end()) { 1657 end_(state.enabled_pkp_hosts_.end()) {
1658 } 1658 }
1659 1659
1660 TransportSecurityState::PKPStateIterator::~PKPStateIterator() { 1660 TransportSecurityState::PKPStateIterator::~PKPStateIterator() {
1661 } 1661 }
1662 1662
1663 } // namespace 1663 } // namespace
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698