From 7440119e729d3fdedda8a9b44b70f8959beea8d7 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 1 Feb 2017 17:54:14 +0100 Subject: dirmngr: New option --no-use-tor and internal changes. * dirmngr/dns-stuff.c (disable_dns_tormode): New. * dirmngr/dirmngr.c (oNoUseTor): New const. (opts): New option --no-use-tor. (tor_mode): New var. (parse_rereadable_options): Change to use TOR_MODE. (dirmngr_use_tor): New. (set_tor_mode): Call disable_dns_tormode. Implement oNoUseTor. * dirmngr/dirmngr.h (opt): Remove field 'use_tor'. Replace all references by a call to dirmngr_use_tor(). * dirmngr/server.c (cmd_getinfo): Distinguish between default and enforced TOR_MODE. -- This patch replaces the global variable opt.use_tar by a function testing a file local mode flag. This patch prepares for a use-tor-if-available mode. GnuPG-bug-id: 2935 Signed-off-by: Werner Koch --- dirmngr/dns-stuff.h | 1 + 1 file changed, 1 insertion(+) (limited to 'dirmngr/dns-stuff.h') diff --git a/dirmngr/dns-stuff.h b/dirmngr/dns-stuff.h index 9eb97fd6a..9b8303c3b 100644 --- a/dirmngr/dns-stuff.h +++ b/dirmngr/dns-stuff.h @@ -120,6 +120,7 @@ int recursive_resolver_p (void); /* Put this module eternally into Tor mode. When called agained with * NEW_CIRCUIT request a new TOR circuit for the next DNS query. */ void enable_dns_tormode (int new_circuit); +void disable_dns_tormode (void); /* Change the default IP address of the nameserver to IPADDR. The address needs to be a numerical IP address and will be used for the -- cgit v1.2.3