diff options
author | Werner Koch <[email protected]> | 2017-01-03 11:03:28 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2017-01-03 11:43:33 +0000 |
commit | 969512401603639e4467ede7d892f1b02582c2c9 (patch) | |
tree | 0e720221d906ac82ade2dbc0831f5f9b9d0aa27a /dirmngr/dirmngr.c | |
parent | dirmngr: New debug message on correctly initialized libdns. (diff) | |
download | gnupg-969512401603639e4467ede7d892f1b02582c2c9.tar.gz gnupg-969512401603639e4467ede7d892f1b02582c2c9.zip |
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 <[email protected]>
Diffstat (limited to '')
-rw-r--r-- | dirmngr/dirmngr.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/dirmngr/dirmngr.c b/dirmngr/dirmngr.c index 5ee589e93..f50e935b8 100644 --- a/dirmngr/dirmngr.c +++ b/dirmngr/dirmngr.c @@ -481,6 +481,9 @@ set_tor_mode (void) { if (opt.use_tor) { + /* Enable Tor mode and when called again force a new curcuit + * (e.g. on SIGHUP). */ + enable_dns_tormode (1); if (assuan_sock_set_flag (ASSUAN_INVALID_FD, "tor-mode", 1)) { log_error ("error enabling Tor mode: %s\n", strerror (errno)); @@ -919,13 +922,6 @@ main (int argc, char **argv) log_info ("NOTE: this is a development version!\n"); #endif - if (opt.use_tor) - { - log_info ("WARNING: ***************************************\n"); - log_info ("WARNING: Tor mode (--use-tor) MAY NOT FULLY WORK!\n"); - log_info ("WARNING: ***************************************\n"); - } - /* Print a warning if an argument looks like an option. */ if (!opt.quiet && !(pargs.flags & ARGPARSE_FLAG_STOP_SEEN)) { |