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 #ifndef NET_HTTP_TRANSPORT_SECURITY_STATE_H_ | 5 #ifndef NET_HTTP_TRANSPORT_SECURITY_STATE_H_ |
6 #define NET_HTTP_TRANSPORT_SECURITY_STATE_H_ | 6 #define NET_HTTP_TRANSPORT_SECURITY_STATE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
477 // the Delegate (if any). | 477 // the Delegate (if any). |
478 bool DeleteDynamicDataForHost(const std::string& host); | 478 bool DeleteDynamicDataForHost(const std::string& host); |
479 | 479 |
480 // Returns true and updates |*sts_result| and |*pkp_result| iff there is a | 480 // Returns true and updates |*sts_result| and |*pkp_result| iff there is a |
481 // static (built-in) state for |host|. If multiple entries match |host|, | 481 // static (built-in) state for |host|. If multiple entries match |host|, |
482 // the most specific match determines the return value. | 482 // the most specific match determines the return value. |
483 bool GetStaticDomainState(const std::string& host, | 483 bool GetStaticDomainState(const std::string& host, |
484 STSState* sts_result, | 484 STSState* sts_result, |
485 PKPState* pkp_result) const; | 485 PKPState* pkp_result) const; |
486 | 486 |
487 // Returns true iff there is static (built-in) state for |host| that | |
488 // references the Google pins. | |
489 // TODO(rch): Remove this temporary gross layering violation once QUIC 32 is | |
490 // deployed. | |
491 bool IsGooglePinnedHost(const std::string& host) const; | |
492 | |
493 // Returns true and updates |*result| iff |host| has HSTS/HPKP/Expect-CT | 487 // Returns true and updates |*result| iff |host| has HSTS/HPKP/Expect-CT |
494 // (respectively) state. If multiple entries match |host|, the most specific | 488 // (respectively) state. If multiple entries match |host|, the most specific |
495 // match determines the return value. | 489 // match determines the return value. |
496 // | 490 // |
497 // Note that these methods are not const because they opportunistically remove | 491 // Note that these methods are not const because they opportunistically remove |
498 // entries that have expired. | 492 // entries that have expired. |
499 bool GetDynamicSTSState(const std::string& host, STSState* result); | 493 bool GetDynamicSTSState(const std::string& host, STSState* result); |
500 bool GetDynamicPKPState(const std::string& host, PKPState* result); | 494 bool GetDynamicPKPState(const std::string& host, PKPState* result); |
501 bool GetDynamicExpectCTState(const std::string& host, ExpectCTState* result); | 495 bool GetDynamicExpectCTState(const std::string& host, ExpectCTState* result); |
502 | 496 |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
712 // rate-limiting. | 706 // rate-limiting. |
713 ReportCache sent_hpkp_reports_cache_; | 707 ReportCache sent_hpkp_reports_cache_; |
714 ReportCache sent_expect_ct_reports_cache_; | 708 ReportCache sent_expect_ct_reports_cache_; |
715 | 709 |
716 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState); | 710 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState); |
717 }; | 711 }; |
718 | 712 |
719 } // namespace net | 713 } // namespace net |
720 | 714 |
721 #endif // NET_HTTP_TRANSPORT_SECURITY_STATE_H_ | 715 #endif // NET_HTTP_TRANSPORT_SECURITY_STATE_H_ |
OLD | NEW |