From 969512401603639e4467ede7d892f1b02582c2c9 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 3 Jan 2017 12:03:28 +0100 Subject: dirmngr: Make sure Tor mode is also set for DNS on SIGHUP. * dirmngr/dns-stuff.c (enable_dns_tormode): Always succeed. (reload_dns_stuff): Reset tor port. * dirmngr/dirmngr.c (set_tor_mode): Also enable Tor mode for DNS. (main): Remove warning that Tor mode may not fully work. * dirmngr/server.c (cmd_dns_cert): Remove explicit Tor for DNS initialization. * dirmngr/t-dns-stuff.c (main): Remove option --new-circuit and error checking for enable_dns_tormode. -- This patch also resets the port on SIGHUP so that after starting Tor SIGHUP is sufficient to use Tor. Without the SIGHUP and when not using the Tor browser Dirmngr would keep on trying the Tor browser port. Signed-off-by: Werner Koch --- dirmngr/dns-stuff.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'dirmngr/dns-stuff.h') diff --git a/dirmngr/dns-stuff.h b/dirmngr/dns-stuff.h index 0a4a4de2f..eb7fe7246 100644 --- a/dirmngr/dns-stuff.h +++ b/dirmngr/dns-stuff.h @@ -113,9 +113,9 @@ void enable_recursive_resolver (int yes); /* Return true iff the recursive resolver is used. */ int recursive_resolver_p (void); -/* Calling this function switches the DNS code into Tor mode if - possibe. Return 0 on success. */ -gpg_error_t enable_dns_tormode (int new_circuit); +/* 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); /* 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