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 <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
632 hostname_offset--; | 632 hostname_offset--; |
633 break; | 633 break; |
634 } | 634 } |
635 } | 635 } |
636 } | 636 } |
637 } | 637 } |
638 | 638 |
639 bool DecodeHSTSPreload(const std::string& hostname, PreloadResult* out) { | 639 bool DecodeHSTSPreload(const std::string& hostname, PreloadResult* out) { |
640 bool found; | 640 bool found; |
641 if (!DecodeHSTSPreloadRaw(hostname, &found, out)) { | 641 if (!DecodeHSTSPreloadRaw(hostname, &found, out)) { |
642 DCHECK(false) << "Internal error in DecodeHSTSPreloadRaw for hostname " | 642 // This can happen when INCLUDE_TRANSPORT_SECURITY_STATE_PRELOAD_LIST is |
643 << hostname; | 643 // false, in which can BitReader.seek(0) will return false. |
xunjieli
2017/06/30 19:12:18
Ryan, I had to update the code to not DCHECK(false
| |
644 return false; | 644 return false; |
645 } | 645 } |
646 | 646 |
647 return found; | 647 return found; |
648 } | 648 } |
649 | 649 |
650 // Serializes an OCSPVerifyResult::ResponseStatus to a string enum, suitable for | 650 // Serializes an OCSPVerifyResult::ResponseStatus to a string enum, suitable for |
651 // the |response-status| field in an Expect-Staple report. | 651 // the |response-status| field in an Expect-Staple report. |
652 std::string SerializeExpectStapleResponseStatus( | 652 std::string SerializeExpectStapleResponseStatus( |
653 OCSPVerifyResult::ResponseStatus status) { | 653 OCSPVerifyResult::ResponseStatus status) { |
(...skipping 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1845 TransportSecurityState::PKPStateIterator::PKPStateIterator( | 1845 TransportSecurityState::PKPStateIterator::PKPStateIterator( |
1846 const TransportSecurityState& state) | 1846 const TransportSecurityState& state) |
1847 : iterator_(state.enabled_pkp_hosts_.begin()), | 1847 : iterator_(state.enabled_pkp_hosts_.begin()), |
1848 end_(state.enabled_pkp_hosts_.end()) { | 1848 end_(state.enabled_pkp_hosts_.end()) { |
1849 } | 1849 } |
1850 | 1850 |
1851 TransportSecurityState::PKPStateIterator::~PKPStateIterator() { | 1851 TransportSecurityState::PKPStateIterator::~PKPStateIterator() { |
1852 } | 1852 } |
1853 | 1853 |
1854 } // namespace net | 1854 } // namespace net |
OLD | NEW |