| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |