Граф коммитов

92 Коммитов

Автор SHA1 Сообщение Дата
Nathan Froyd e1d8b92ec6 Bug 1255425 - part 2 - pack kSTSPreloadList into a more efficient format; r=keeler
Entries in kSTSPreloadList currently look like:

class nsSTSPreload
{
  public:
    const char *mHost;
    const bool mIncludeSubdomains;
};

This is inefficient for a couple of reasons:

* The structure has a bunch of wasted space: it takes 8 bytes on 32-bit
  platforms and 16 bytes on 64-bit platforms, even though it only uses 5
  and 9 bytes, respectively.

* The |const char*| requires additional space in the form of relocations
  (at least on Linux/Android), which doubles the space cost of
  individual entries.  (The space cost of the relocations is mitigated
  somewhat on Linux and Android because of elfhack, but there's still
  extra cost in the on-disk format and during the load of libxul to
  process those relocations.)

* The relocations the structure requires means that the data in it can't
  be shared between processes, which is important for e10s with multiple
  content processes.

We can make it more efficient by structuring it like so:

static const char kSTSPreloadHosts[] = {
  // One giant character array containing the hosts, in order:
  //   "example.com\0example.org\0example.test\0..."
  // Use an array rather than a literal string due to compiler limitations.
};

struct nsSTSPreload
{
  // An index into kSTSPreloadHosts for the hostname.
  uint32_t mHostIndex: 31;
  // We use the same datatype for both members so that MSVC will pack
  // the bitfields into a single uint32_t.
  uint32_t mIncludeSubdomains: 1;
};

nsSTSPreload now has no wasted space and is significantly smaller,
especially on 64-bit platforms (saves ~29K on 32-bit platforms and ~85K
on 64-bit platforms).  This organization does add a couple extra
operations to searching for preload list entries, depending on your
platform, but the space savings make it worth it.
2016-03-24 15:09:28 -04:00
Nathan Froyd b2490bf812 Bug 1255425 - part 1 - clearly delineate steps when outputting HSTS preload list; r=keeler
The main loop of |output| tweaks entries, filters out entries based on
some conditions, and writes out the actual entries we're going to use.
Let's separate those three steps so it's clearer what's happening where.
2016-03-11 15:35:47 -05:00
Cykesiopka c343159d73 Bug 1253108 - Enable ESLint "strict" rule for PSM. r=keeler
MozReview-Commit-ID: 4wElZ8Guq9z

--HG--
extra : rebase_source : 60fb87c33d041994f35cbf9fd2fb3a55bd753bc6
2016-03-19 03:07:13 -07:00
Cykesiopka e6008c2304 Bug 1251011 - Enable ESLint "no-undef" rule for PSM. r=keeler r=mossop
MozReview-Commit-ID: 1lbwWWkJjqq

--HG--
extra : rebase_source : 10fa76138cb5c4ac53b2b49f99b26ce3748f9fff
2016-03-16 16:50:33 -07:00
Nicholas Nethercote e098d1b141 Bug 1255655 - Const-ify kPinset_* arrays. r=cykesiopka.
--HG--
extra : rebase_source : b8c360a7c79bd3e79d30210cd8e624e3e4eae7c3
2016-03-11 13:54:41 +11:00
Cykesiopka 610314abc0 Bug 1253958 - Make getHSTSPreloadList.js and genHPKPStaticPins.js gracefully handle trailing whitespace in URL entries. r=dkeeler
MozReview-Commit-ID: Kyc7JzxVEo0

--HG--
extra : rebase_source : 009554017b7ec1e2c6e57430ee554eb94deb2a3a
2016-03-06 16:02:52 -08:00
Cykesiopka a650e7a431 Bug 1250254 - Enable ESLint "no-throw-literal" rule for PSM. r=dkeeler
MozReview-Commit-ID: LZcitO0FTWH

--HG--
rename : security/manager/.eslintrc => security/manager/.eslintrc.json
extra : transplant_source : %95%EA%08ofJn-l%3D%A2W%90%A6i%E4%5D%A1c%3E
2016-02-29 20:05:55 -08:00
Cykesiopka b9a9010687 Bug 1249595 - Enable 11 more ESLint rules for PSM. r=keeler
MozReview-Commit-ID: FxS9SPRMMxf

--HG--
extra : transplant_source : %18%08%F0%EB%E3%AD%3E%F7%94%80%05%C0%D0P%5Co.%940%7E
2016-02-26 12:35:34 -08:00
Cykesiopka f64795a71b Bug 1246365 - Enable eslint "comma-spacing" and "semi" rules for PSM. r=keeler
MozReview-Commit-ID: 7FVcD7O9mpG

--HG--
extra : transplant_source : R%C3B%B73%0A%9E%FA%83_%CF%FE%86O%B4%FF%C4f%EB%9C
2016-02-18 21:16:50 -08:00
Cykesiopka eb91d4f287 Bug 1244245 - Enable eslint "curly" rule for PSM. r=keeler
Also includes minor cleanup.

MozReview-Commit-ID: CHgbTIa3s2O

--HG--
extra : transplant_source : %FD%ACi%DE%3E%28%0D%D2_%5Dc%1Dk%E6%E8%EDw%D5%FA%93
2016-02-16 17:27:49 -08:00
ISHIKAWA, Chiaki be2b50a7f8 Bug 1248252 - Improper outdated octal constant syntax in M-C tree. Use '0o' prefix. r=dao
Be warned. Do not attemp to change the .js "test" source code in ./js
They are meant to check

 - the outdated 0666 octal constant is still parsed correctly,
 - the outdated 0666 octal constant raises syntax error flag
   in strict mode, etc.

So leave them alone.
2016-02-15 08:57:00 +01:00
David Keeler 5ceb0c8a89 bug 1246765 - remove unnecessary resource://app/ registration from getHSTSPreloadList.js r=Cykesiopka DONTBUILD NPOTB 2016-02-08 12:56:34 -08:00
Cykesiopka 7e014d6be0 Bug 1243182 - Enable eslint "space-infix-ops" rule for PSM. r=keeler
Also includes minor cleanups.
2016-02-06 21:05:02 -08:00
Cykesiopka 7ccd56ad60 Bug 1242254 - Enable initial set of eslint rules for PSM. r=dkeeler
These rules are copied from toolkit/.eslintrc (with non-passing rules excluded and previously commented out and passing rules included).

--HG--
extra : rebase_source : 0afa42350cc961cbb3cf6d985b3978f4dc5d3dcb
2016-01-24 02:35:36 -08:00
Cykesiopka e2fe0b8f62 Bug 1233328 - Part 2: Use SHA-256 StaticFingerprints directly instead of StaticPinset since the SHA-1 StaticFingerprints entry will always be null. r=keeler 2016-01-20 20:45:29 -08:00
David Keeler 17c8d8e45c bug 1232766 - update the preloaded pinset for Google domains r=rbarnes
Also includes a script for making this process faster in the future.
2015-12-28 12:30:14 -08:00
Cykesiopka 05919374b8 Bug 1229284 - Remove support for SHA-1 hashes in genHPKPStaticPins.js. r=keeler 2015-12-17 07:52:00 +01:00
Cykesiopka cb705a63a6 Bug 1224968 - Support public key input to unbreak periodic HPKP updates. r=keeler
be448badb1%5E!/#F0 switched SHA1 hashes to public keys for static pins. This broke genHPKPStaticPins.js and thus periodic HPKP updates, since the file doesn't handle public keys.

The changes here mostly mirror ba1f296240.
2015-12-01 00:30:00 +01:00
Cykesiopka c10edfff85 Bug 1224481 - Comment out CA certs removed in NSS 3.21 in PreloadedHPKPins.json to keep periodic Static HPKP updates working. r=dkeeler
--HG--
extra : transplant_source : %EAM%5D1%93%28H%BA%82%C0%0F%BB%3D%9E%40%8B%BCx%EB%03
2015-11-13 07:28:28 -08:00
David Keeler 1443993537 bug 1218515 - flip pinning-test.badssl.com into production mode r=jcj DONTBUILD NPOTB
pinning-test.badssl.com is a test domain for preloaded HPKP (HTTP Public Key
Pinning - see RFC 7469). By specifying a pinset corresponding to no known keys,
this domain should fail with a key pinning error by default. Also, the
includeSubdomains option is set, so any subdomains should fail as well.
Since Gecko incorporates preloaded pinsets from Chromium, this pinset is already
defined. This patch merely switches it from test mode to production mode (well,
to be more accurate, this patch sets up the input for the automated script that
will make the code change that will put the pinset into production mode).
2015-10-26 14:39:25 -07:00
Masatoshi Kimura 6ad41c8aee Bug 1215796 - Remove the static fallback whitelist. r=keeler 2015-10-22 21:37:40 +09:00
Carsten "Tomcat" Book 08997000eb Backed out 2 changesets (bug 1202902) to recking bug 1202902 to be able to reopen inbound on a CLOSED TREE
Backed out changeset 647025383676 (bug 1202902)
Backed out changeset d70c7fe532c6 (bug 1202902)
2015-10-07 14:03:21 +02:00
Carsten "Tomcat" Book e7ef778c9d Backed out 1 changesets (bug 1202902) for causing merge conflicts to mozilla-central
Backed out changeset cfc1820361f5 (bug 1202902)

--HG--
extra : rebase_source : 5d3db72337754bc7ab0ed0c30b2896100411ff92
2015-10-07 12:13:45 +02:00
Shu-yu Guo d06b6030f6 Bug 1202902 - Scripted fix the world. 2015-10-06 14:00:31 -07:00
David Keeler 74e470d1ac bug 1203312 - convert tlsserver to generate certificates at build time r=Cykesiopka,mgoodwin 2015-08-24 15:53:07 -07:00
Wes Kocher 21a9e609d5 Backed out changeset a08287c70962 (bug 1203312) for b2g xpcshell failures 2015-09-18 12:53:24 -07:00
David Keeler 4cfc799e53 bug 1203312 - convert tlsserver to generate certificates at build time r=Cykesiopka,mgoodwin 2015-08-24 15:53:07 -07:00
Shu-yu Guo 64db2267cf Bug 1202902 - Mass replace toplevel 'let' with 'var' in preparation for global lexical scope. (rs=jorendorff) 2015-09-15 11:19:45 -07:00
Nick Thomas 5744a154e2 Bug 1197607, Automated hsts & hpkp updates are failing on mozilla-central, mozilla-aurora, mozilla-esr38, r=cykesiopka 2015-09-03 22:07:42 +12:00
Ben Hearsum c51baf3ae9 bug 1116409: switch update server to sha2 cert; update in-tree pinning. r=rstrong,snorp,mfinkle,dkeeler 2015-08-20 17:50:51 -04:00
David Keeler 3c315d18c3 bug 1102436 - remove PublicKeyPinningService::CheckChainAgainstAllNames r=Cykesiopka 2015-05-07 11:06:07 -07:00
David Keeler a4f79b207d bug 1157873 - remove certificates from CNNIC whitelist that aren't in the Pilot Certificate Transparency log r=rbarnes
Also remove certificates where notBefore is on or after 1 April 2015.
2015-04-21 16:07:33 -07:00
David Keeler 5ff51a7744 bug 1151512 - only allow whitelisted certificates to be issued by CNNIC root certificates r=jcj r=rbarnes 2015-04-07 17:29:05 -07:00
David Keeler 0bf38c806e bug 1138716 - update PSM data structures that depend on root CA changes r=mmc 2015-03-23 10:36:55 -07:00
Masatoshi Kimura 562649fe82 Bug 1128227 - Add a static TLS insecure fallback whitelist. r=keeler 2015-02-07 13:03:23 +09:00
Monica Chew 63de38c180 Bug 1101969: Disable pinning on media.mozilla.com (r=keeler) 2014-12-12 09:10:57 -08:00
Monica Chew 04d69a9f5b Bug 1004781: Enable pinning for facebook in production mode (r=keeler) 2014-12-12 09:10:53 -08:00
David Keeler ab80d0c717 bug 1091232 - update PSM data structures that are affected by root CA changes r=mmc 2014-11-18 16:41:18 -08:00
Monica Chew 419fa97eb6 Bug 1092606: Filter out duplicate pinsets as well as domains (r=keeler) 2014-11-17 12:54:42 -08:00
Monica Chew f991b325aa Bug 1098288: Enable pinning on spideroak (r=keeler) 2014-11-14 11:17:40 -08:00
Monica Chew a89f219bef Bug 1030135: Promote pin for services.mozilla.com to production mode (r=keeler) 2014-11-07 12:00:50 -08:00
Monica Chew d68cf9f6e1 Bug 1004781: Remove unnecessary cert for facebook (r=keeler) 2014-11-04 10:54:26 -08:00
Monica Chew eeb4a7f756 Bug 1092606: Don't import Chromium pinsets for domains that are already in our list (r=keeler,jcj) 2014-11-04 10:53:52 -08:00
Monica Chew 3e0f2fd921 Bug 1004781: Actually remove the pinset (r=keeler) 2014-10-30 16:21:09 -07:00
Monica Chew 1e19be7e65 Bug 1004781: Remove our pinset for facebook since it's in chromium now (r=keeler) 2014-10-30 16:14:19 -07:00
David Keeler 46c48f2321 bug 1083085 - update where getHSTSPreloadList.js and genHPKPStaticPins.js think Chromium's lists are r=mmc DONTBUILD NPOTB 2014-10-21 15:20:02 -07:00
J.C. Jones e75e48ed45 Bug 1054498 - Report pinning violations by CA r=keeler 2014-10-17 10:33:50 -07:00
David Keeler 4ae95106e2 bug 1077891 - update getHSTSPreloadList.js to reflect changes to nsISiteSecurityService r=mmc DONTBUILD NPOTB 2014-10-06 11:28:15 -07:00
Monica Chew af2478ad59 Bug 1030135: Set is_moz if the pinset name contains mozilla, set bucket id for pinsets containing the string mozilla (r=keeler) 2014-10-02 16:45:13 -07:00
David Keeler d577ecb4c1 bug 1004781 - follow-up to add "DigiCert ECC Secure Server CA" to Facebook's pinset r=mmc 2014-09-08 09:33:03 -07:00