summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-06-12 23:48:08 +0100
committerMichał Górny <mgorny@gentoo.org>2024-06-17 14:07:06 +0200
commit5c129e2320902b2d525c4592fd172984e5db6fd4 (patch)
treec67f6673d0d8764846c8519095bb6c4eea5dbc10
parent6ed34d784720f3c6b5ec63f4dd8a1a6ec92973dc (diff)
downloadgemato-5c129e2320902b2d525c4592fd172984e5db6fd4.tar.gz
openpgp: disable Tor use in dirmngr
Pass 'no-use-tor' to avoid automagically using Tor if it's available on the system (which gnupg does by default)! This often causes connectivity issues and is a source of great confusion for users. See also d54fc1c3f35dca78a66dde10b857ab9ee54c68bc in getuto. Signed-off-by: Sam James <sam@gentoo.org> Closes: https://github.com/projg2/gemato/pull/34 Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r--gemato/openpgp.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/gemato/openpgp.py b/gemato/openpgp.py
index 233cc9d..fede3e5 100644
--- a/gemato/openpgp.py
+++ b/gemato/openpgp.py
@@ -1,5 +1,5 @@
# gemato: OpenPGP verification support
-# (c) 2017-2023 Michał Górny
+# (c) 2017-2024 Michał Górny
# SPDX-License-Identifier: GPL-2.0-or-later
import base64
@@ -413,10 +413,13 @@ class IsolatedGPGEnvironment(SystemGPGEnvironment):
with open(os.path.join(self._home, 'dirmngr.conf'), 'w') as f:
f.write(f'''# autogenerated by gemato
-
# honor user's http_proxy setting
honor-http-proxy
+# Disable automagically using Tor when running. This often leads
+# to connectivity issues and is unexpected for users.
+no-use-tor
+
# The default of "recursive-resolver" (see "man dirmngr") may cause
# problems with corporate networks, where this is often prohibited.
# It's better to setup the DNS resolver of your choice correctly