From 5c129e2320902b2d525c4592fd172984e5db6fd4 Mon Sep 17 00:00:00 2001 From: Sam James Date: Wed, 12 Jun 2024 23:48:08 +0100 Subject: [PATCH] openpgp: disable Tor use in dirmngr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Closes: https://github.com/projg2/gemato/pull/34 Signed-off-by: Michał Górny --- gemato/openpgp.py | 7 +++++-- 1 file 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 @@ def __init__(self, debug=False, proxy=None, timeout=None): 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