summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authoragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-08 14:07:56 +0000
committeragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-08 14:07:56 +0000
commit7b3fa679c32be0771c3bd3983b24caed25d64257 (patch)
tree38ef5c100f0edc16c90c1d57de726b9bbfc4f02e /net
parentac7264cf34b514ff94fcce9a9c7dae0704cd4e10 (diff)
downloadchromium_src-7b3fa679c32be0771c3bd3983b24caed25d64257.zip
chromium_src-7b3fa679c32be0771c3bd3983b24caed25d64257.tar.gz
chromium_src-7b3fa679c32be0771c3bd3983b24caed25d64257.tar.bz2
net: add jottit.com to the STS preloaded list.
(At the request of Aaron Swartz) BUG=none TEST=Go to http://jottit.com and note that the URL is rewritten to https://jottit.com http://codereview.chromium.org/2867049/show git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51841 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/base/transport_security_state.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/net/base/transport_security_state.cc b/net/base/transport_security_state.cc
index 9013238..5ddcf39 100644
--- a/net/base/transport_security_state.cc
+++ b/net/base/transport_security_state.cc
@@ -391,20 +391,20 @@ bool TransportSecurityState::isPreloadedSTS(
uint8 length;
bool include_subdomains;
char dns_name[30];
- } preloadedSTS[] = {
+ } kPreloadedSTS[] = {
{16, false, "\003www\006paypal\003com"},
{16, false, "\003www\006elanex\003biz"},
+ {12, true, "\006jottit\003com"},
};
- static const size_t numPreloadedSTS =
- sizeof(preloadedSTS) / sizeof(preloadedSTS[0]);
+ static const size_t kNumPreloadedSTS = ARRAYSIZE_UNSAFE(kPreloadedSTS);
for (size_t i = 0; canonicalised_host[i]; i += canonicalised_host[i] + 1) {
- for (size_t j = 0; j < numPreloadedSTS; j++) {
- if (preloadedSTS[j].length == canonicalised_host.size() + 1 - i &&
- (preloadedSTS[j].include_subdomains || i == 0) &&
- memcmp(preloadedSTS[j].dns_name, &canonicalised_host[i],
- preloadedSTS[j].length) == 0) {
- *include_subdomains = preloadedSTS[j].include_subdomains;
+ for (size_t j = 0; j < kNumPreloadedSTS; j++) {
+ if (kPreloadedSTS[j].length == canonicalised_host.size() + 1 - i &&
+ (kPreloadedSTS[j].include_subdomains || i == 0) &&
+ memcmp(kPreloadedSTS[j].dns_name, &canonicalised_host[i],
+ kPreloadedSTS[j].length) == 0) {
+ *include_subdomains = kPreloadedSTS[j].include_subdomains;
return true;
}
}