Bug 1197607, Automated hsts & hpkp updates are failing on mozilla-central, mozilla-aurora, mozilla-esr38, r=cykesiopka
authorNick Thomas <nthomas@mozilla.com>
Thu, 03 Sep 2015 22:07:42 +1200
changeset 260673 2c6a43112cb11e92d2b60f4ff65165aa25c91d98
parent 260672 4d7fa39e2d3f06ef3bd41063837365010317666f
child 260674 21e229c5ff708285d9e2c837c9679aab55ee4c48
push id29320
push userkwierso@gmail.com
push dateThu, 03 Sep 2015 19:20:46 +0000
treeherdermozilla-central@1eb12ed3b236 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscykesiopka
bugs1197607
milestone43.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1197607, Automated hsts & hpkp updates are failing on mozilla-central, mozilla-aurora, mozilla-esr38, r=cykesiopka
security/manager/tools/PreloadedHPKPins.json
security/manager/tools/genHPKPStaticPins.js
security/manager/tools/getHSTSPreloadList.js
--- a/security/manager/tools/PreloadedHPKPins.json
+++ b/security/manager/tools/PreloadedHPKPins.json
@@ -164,19 +164,17 @@
         "Network Solutions Certificate Authority",
         // "RSA Root Certificate 1",
         "Starfield Class 2 CA",
         "Starfield Root Certificate Authority - G2",
         "Starfield Services Root Certificate Authority - G2",
         "StartCom Certification Authority",
         "StartCom Certification Authority",
         "StartCom Certification Authority G2",
-        "TC TrustCenter Class 2 CA II",
         "TC TrustCenter Class 3 CA II",
-        "TC TrustCenter Universal CA I",
         "TC TrustCenter Universal CA III",
         // "Thawte Premium Server CA",
         "thawte Primary Root CA",
         "thawte Primary Root CA - G2",
         "thawte Primary Root CA - G3",
         // "Thawte Server CA",
         "UTN DATACorp SGC Root CA",
         "UTN USERFirst Hardware Root CA",
--- a/security/manager/tools/genHPKPStaticPins.js
+++ b/security/manager/tools/genHPKPStaticPins.js
@@ -139,18 +139,18 @@ function download(filename) {
   }
   catch (e) {
     throw "ERROR: could not decode data as base64 from '" + filename + "': " + e;
   }
   return resultDecoded;
 }
 
 function downloadAsJson(filename) {
-  // we have to filter out '//' comments
-  let result = download(filename).replace(/\/\/[^\n]*\n/g, "");
+  // we have to filter out '//' comments, while not mangling the json
+  let result = download(filename).replace(/^(\s*)?\/\/[^\n]*\n/mg, "");
   let data = null;
   try {
     data = JSON.parse(result);
   }
   catch (e) {
     throw "ERROR: could not parse data from '" + filename + "': " + e;
   }
   return data;
--- a/security/manager/tools/getHSTSPreloadList.js
+++ b/security/manager/tools/getHSTSPreloadList.js
@@ -80,18 +80,18 @@ function download() {
   var resultDecoded;
   try {
     resultDecoded = atob(req.responseText);
   }
   catch (e) {
     throw "ERROR: could not decode data as base64 from '" + SOURCE + "': " + e;
   }
 
-  // we have to filter out '//' comments
-  var result = resultDecoded.replace(/\/\/[^\n]*\n/g, "");
+  // we have to filter out '//' comments, while not mangling the json
+  var result = resultDecoded.replace(/^(\s*)?\/\/[^\n]*\n/mg, "");
   var data = null;
   try {
     data = JSON.parse(result);
   }
   catch (e) {
     throw "ERROR: could not parse data from '" + SOURCE + "': " + e;
   }
   return data;