Skip to content

Commit 112b3ed

Browse files
emanueLcziraiemanueLczirai
authored andcommitted
toggleHttpNowhere function appeared twice in code
1 parent 4cbe605 commit 112b3ed

File tree

1 file changed

+0
-34
lines changed

1 file changed

+0
-34
lines changed

src/components/https-everywhere.js

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -851,40 +851,6 @@ HTTPSEverywhere.prototype = {
851851
let ORIG_OCSP_REQUIRED = "orig.ocsp.required";
852852

853853

854-
if (thisBranch.getBoolPref("enabled")) {
855-
// Restore original OCSP settings. TODO: What if user manually edits
856-
// these while HTTP Nowhere is enabled?
857-
let origOcspRequired = thisBranch.getBoolPref(ORIG_OCSP_REQUIRED);
858-
securityBranch.setBoolPref(OCSP_REQUIRED, origOcspRequired);
859-
860-
thisBranch.setBoolPref("enabled", false);
861-
this.httpNowhereEnabled = false;
862-
} else {
863-
// Save original OCSP settings in HTTP Nowhere preferences branch.
864-
let origOcspRequired = securityBranch.getBoolPref(OCSP_REQUIRED);
865-
thisBranch.setBoolPref(ORIG_OCSP_REQUIRED, origOcspRequired);
866-
867-
// Disable OCSP enforcement
868-
securityBranch.setBoolPref(OCSP_REQUIRED, false);
869-
870-
thisBranch.setBoolPref("enabled", true);
871-
this.httpNowhereEnabled = true;
872-
}
873-
},
874-
875-
toggleHttpNowhere: function() {
876-
let prefService = Services.prefs;
877-
let thisBranch =
878-
prefService.getBranch("extensions.https_everywhere.http_nowhere.");
879-
let securityBranch = prefService.getBranch("security.");
880-
881-
// Whether cert is treated as invalid when OCSP connection fails
882-
let OCSP_REQUIRED = "OCSP.require";
883-
884-
// Branch to save original settings
885-
let ORIG_OCSP_REQUIRED = "orig.ocsp.required";
886-
887-
888854
if (thisBranch.getBoolPref("enabled")) {
889855
// Restore original OCSP settings. TODO: What if user manually edits
890856
// these while HTTP Nowhere is enabled?

0 commit comments

Comments
 (0)