Bug 1092606: Filter out duplicate pinsets as well as domains (r=keeler)

This commit is contained in:
Monica Chew 2014-11-17 12:54:42 -08:00
parent 0c433f5188
commit 2d3f38456b

View File

@ -530,7 +530,9 @@ function writeFile(certNameToSKD, certSKDToName,
// Compute used pins from both Chrome's and our pinsets, so we can output
// them later.
let usedFingerprints = {};
let mozillaPins = {};
gStaticPins.pinsets.forEach(function(pinset) {
mozillaPins[pinset.name] = true;
// We aren't guaranteed to have sha1_hashes in our own JSON.
if (pinset.sha1_hashes) {
pinset.sha1_hashes.forEach(function(name) {
@ -573,7 +575,12 @@ function writeFile(certNameToSKD, certSKDToName,
});
writeString("/* Chrome static pinsets */\n");
for (let key in chromeImportedPinsets) {
writeFullPinset(certNameToSKD, certSKDToName, chromeImportedPinsets[key]);
if (mozillaPins[key]) {
dump("Skipping duplicate pinset " + key + "\n");
} else {
dump("Writing pinset " + key + "\n");
writeFullPinset(certNameToSKD, certSKDToName, chromeImportedPinsets[key]);
}
}
// Write the domainlist entries.