Skip to content

Commit 266c4e1

Browse files
Dan AuerbachDan Auerbach
authored andcommitted
Use about:config variable to toggle whitelist
1 parent 6fcb9cf commit 266c4e1

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/components/ssl-observatory.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -257,12 +257,16 @@ SSLObservatory.prototype = {
257257
var chain_hash = sha256_digest(chainArrayFpStr).toUpperCase();
258258
this.log(INFO, "SHA-256 hash of cert chain for "+new String(subject.URI.host)+" is "+ chain_hash);
259259

260-
if (this.isChainWhitelisted(chain_hash)) {
261-
this.log(INFO, "This cert chain is whitelisted. Not submitting.");
262-
return;
260+
if(!this.myGetBoolPref("use_whitelist")) {
261+
this.log(WARN, "Not using whitelist to filter cert chains.");
262+
}
263+
else if (this.isChainWhitelisted(chain_hash)) {
264+
this.log(INFO, "This cert chain is whitelisted. Not submitting.");
265+
return;
263266
}
264-
this.log(INFO, "Cert chain is NOT whitelisted. Proceeding with submission.");
265-
267+
else {
268+
this.log(INFO, "Cert chain is NOT whitelisted. Proceeding with submission.");
269+
}
266270

267271
if (subject.URI.port == -1) {
268272
this.submitChain(chainArray, fps, new String(subject.URI.host), subject);

src/defaults/preferences/preferences.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ pref("extensions.https_everywhere._observatory.use_tor_proxy",true);
2424
pref("extensions.https_everywhere._observatory.alt_roots",false);
2525
pref("extensions.https_everywhere._observatory.priv_dns",false);
2626
pref("extensions.https_everywhere._observatory.send_asn",true);
27-
27+
pref("extensions.https_everywhere._observatory.use_whitelist",true);

0 commit comments

Comments
 (0)