summaryrefslogtreecommitdiffstats
path: root/net/base/transport_security_state.h
diff options
context:
space:
mode:
authorcevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-21 00:07:16 +0000
committercevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-21 00:07:16 +0000
commitaa90443656f0d3611430edeb730538ad498d0a40 (patch)
tree5c049b6e9ed998d0ef0b186ca9782a089aa2e652 /net/base/transport_security_state.h
parent65b10ba080448288f0fa625d71dc6c42c9b3a67d (diff)
downloadchromium_src-aa90443656f0d3611430edeb730538ad498d0a40.zip
chromium_src-aa90443656f0d3611430edeb730538ad498d0a40.tar.gz
chromium_src-aa90443656f0d3611430edeb730538ad498d0a40.tar.bz2
Add command-line control of the HSTS preload list.
Review URL: http://codereview.chromium.org/6869043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82409 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/transport_security_state.h')
-rw-r--r--net/base/transport_security_state.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/net/base/transport_security_state.h b/net/base/transport_security_state.h
index 8f0b75a..d56583a 100644
--- a/net/base/transport_security_state.h
+++ b/net/base/transport_security_state.h
@@ -44,6 +44,8 @@ class TransportSecurityState :
// * We'll request HTTP URLs over HTTPS iff we have SPDY support.
// * Certificate issues are fatal.
MODE_SPDY_ONLY = 2,
+ // None means there is no HSTS for this domain.
+ MODE_NONE = 3,
};
DomainState();
@@ -104,7 +106,9 @@ class TransportSecurityState :
void SetDelegate(Delegate*);
bool Serialise(std::string* output);
- bool Deserialise(const std::string& state, bool* dirty);
+ // Existing non-preloaded entries are cleared and repopulated from the
+ // passed JSON string.
+ bool LoadEntries(const std::string& state, bool* dirty);
// The maximum number of seconds for which we'll cache an HSTS request.
static const long int kMaxHSTSAgeSecs;
@@ -122,7 +126,10 @@ class TransportSecurityState :
static std::string CanonicalizeHost(const std::string& host);
static bool IsPreloadedSTS(const std::string& canonicalized_host,
bool sni_available,
- bool* out_include_subdomains);
+ DomainState* out);
+ static bool Deserialise(const std::string& state,
+ bool* dirty,
+ std::map<std::string, DomainState>* out);
// The set of hosts that have enabled TransportSecurity. The keys here
// are SHA256(DNSForm(domain)) where DNSForm converts from dotted form