Commit 31c44296 authored by intrigeri's avatar intrigeri
Browse files

Drop obsolete Torbirdy patches: merged upstream.

parent a59b27ed
From: intrigeri <intrigeri@boum.org>
Date: Tue, 31 Jan 2017 15:54:01 +0000
Subject: Use the Tor OnionBalance hidden service pool as the default
keyserver.
---
chrome/content/preferences.js | 2 +-
components/torbirdy.js | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/chrome/content/preferences.js b/chrome/content/preferences.js
index 3f1b9a1..87f46aa 100644
--- a/usr/share/xul-ext/torbirdy/chrome/content/preferences.js
+++ b/usr/share/xul-ext/torbirdy/chrome/content/preferences.js
@@ -7,7 +7,7 @@ if (!org.torbirdy.prefs) org.torbirdy.prefs = new function() {
pub.prefBranch = "extensions.torbirdy.";
pub.customBranch = "extensions.torbirdy.custom.";
- pub.torKeyserver = "hkp://qdigse2yzvuglcix.onion";
+ pub.torKeyserver = "hkp://jirk5u4osbsr34t5.onion";
pub.jondoKeyserver = "hkp://pool.sks-keyservers.net";
pub.prefs = Components.classes["@mozilla.org/preferences-service;1"]
diff --git a/components/torbirdy.js b/components/torbirdy.js
index f9acf0b..01c1c7a 100644
--- a/usr/share/xul-ext/torbirdy/components/torbirdy.js
+++ b/usr/share/xul-ext/torbirdy/components/torbirdy.js
@@ -274,8 +274,8 @@ var TorBirdyPrefs = {
// We want to ensure that Enigmail is proxy aware even when it runs gpg in a shell
"--keyserver-options http-proxy=socks5h://127.0.0.1:9050 ",
- // The default key server should be a hidden service and this is the only known one (it's part of the normal SKS network)
- "extensions.enigmail.keyserver": "hkp://qdigse2yzvuglcix.onion",
+ // The default key server should be a hidden service; use the Tor OnionBalance hidden service pool (https://sks-keyservers.net/overview-of-pools.php#pool_tor)
+ "extensions.enigmail.keyserver": "hkp://jirk5u4osbsr34t5.onion",
// Force GnuPG to use SHA512.
"extensions.enigmail.mimeHashAlgorithm": 5,
From: intrigeri <intrigeri@boum.org>
Date: Tue, 31 Jan 2017 16:04:33 +0000
Subject: Allow specifying that Enigmail keyserver communication is torified
already.
This can be done by setting extensions.torbirdy.enigmail.already_torified
to true.
It is needed e.g. when using GnuPG 2.1+, in which case these keyserver options
break dirmngr:
no-try-dns-srv,http-proxy=socks5h://127.0.0.1:9150
... as reported e.g. on https://trac.torproject.org/projects/tor/ticket/19971
and https://labs.riseup.net/code/issues/11948.
The correct way to torify keyserver communication with Modern GnuPG is to set
"use-tor" in ~/.gnupg/dirmngr.conf. Let's not break things for users who have
configured this properly, e.g. Tails.
Note that the Enigmail master branch has code to use Tor for keyserver
operations. My understanding of the code is that it supports GnuPG 2 nicely, and
detects whether dirmngr is already configured to use Tor. Once that's released
and ready for production use, the parts of the Torbirdy code that are about
torifying Enigmail communication with keyservers can go away:
https://sourceforge.net/p/enigmail/source/ci/74e19771ec18cd5e7b542c32a9b34d47697f50ed/
... which is why I didn't bother investing time into a nicer solution on
Torbirdy's side.
---
chrome/content/overlay.js | 1 +
chrome/content/preferences.js | 13 ++++++++-----
defaults/preferences/prefs.js | 1 +
3 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/chrome/content/overlay.js b/chrome/content/overlay.js
index 1f72c9d..f0c0304 100644
--- a/usr/share/xul-ext/torbirdy/chrome/content/overlay.js
+++ b/usr/share/xul-ext/torbirdy/chrome/content/overlay.js
@@ -40,6 +40,7 @@
// Tor.
if (type === 0) {
myPanel.label = strbundle.getString("torbirdy.enabled.tor");
+ org.torbirdy.prefs.setProxyTor();
}
// JonDo/Whonix.
if (type === 1) {
diff --git a/chrome/content/preferences.js b/chrome/content/preferences.js
index 87f46aa..73ef18f 100644
--- a/usr/share/xul-ext/torbirdy/chrome/content/preferences.js
+++ b/usr/share/xul-ext/torbirdy/chrome/content/preferences.js
@@ -41,17 +41,19 @@ if (!org.torbirdy.prefs) org.torbirdy.prefs = new function() {
if (pub.prefs.getBoolPref("extensions.torbirdy.enigmail.throwkeyid")) {
opts += "--throw-keyids ";
}
- var proxy = "socks5h://127.0.0.1:9050";
- if (anonService === "jondo") {
- proxy = "http://127.0.0.1:4001";
+ if (! pub.prefs.getBoolPref("extensions.torbirdy.gpg_already_torified")) {
+ var proxy = "socks5h://127.0.0.1:9050";
+ if (anonService === "jondo") {
+ proxy = "http://127.0.0.1:4001";
+ }
+ opts += "--keyserver-options=no-try-dns-srv,http-proxy=" + proxy + " ";
}
return opts +
"--no-emit-version " +
"--no-comments " +
"--display-charset utf-8 " +
- "--keyserver-options no-auto-key-retrieve,no-try-dns-srv,http-proxy=" +
- proxy;
+ "--keyserver-options no-auto-key-retrieve";
};
pub.updateKeyserver = function(anonService) {
@@ -201,6 +203,7 @@ if (!org.torbirdy.prefs) org.torbirdy.prefs = new function() {
pub.setPanelSettings(pub.strBundle.GetStringFromName("torbirdy.enabled.tor"), "green");
pub.prefs.setIntPref(pub.prefBranch + 'proxy', 0);
+ pub.setPreferences("extensions.enigmail.agentAdditionalParam", pub.setEnigmailPrefs("tor"));
};
pub.setProxyJonDo = function() {
diff --git a/defaults/preferences/prefs.js b/defaults/preferences/prefs.js
index 8b43562..ea316d3 100644
--- a/usr/share/xul-ext/torbirdy/defaults/preferences/prefs.js
+++ b/usr/share/xul-ext/torbirdy/defaults/preferences/prefs.js
@@ -5,6 +5,7 @@ pref("extensions.torbirdy.warn", true);
pref("extensions.torbirdy.startup_folder", false);
pref("extensions.torbirdy.enigmail.throwkeyid", false);
pref("extensions.torbirdy.enigmail.confirmemail", false);
+pref("extensions.torbirdy.gpg_already_torified", false);
pref("extensions.torbirdy.timezone", true);
pref("extensions.torbirdy.whonix_run", true);
pref("extensions.torbirdy.info_run", false);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment