aboutsummaryrefslogtreecommitdiffstats
path: root/dirmngr/t-dns-stuff.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2017-01-03 11:03:28 +0000
committerWerner Koch <[email protected]>2017-01-03 11:43:33 +0000
commit969512401603639e4467ede7d892f1b02582c2c9 (patch)
tree0e720221d906ac82ade2dbc0831f5f9b9d0aa27a /dirmngr/t-dns-stuff.c
parentdirmngr: New debug message on correctly initialized libdns. (diff)
downloadgnupg-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 'dirmngr/t-dns-stuff.c')
-rw-r--r--dirmngr/t-dns-stuff.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/dirmngr/t-dns-stuff.c b/dirmngr/t-dns-stuff.c
index b087b5ead..bc4ca9a51 100644
--- a/dirmngr/t-dns-stuff.c
+++ b/dirmngr/t-dns-stuff.c
@@ -51,7 +51,6 @@ main (int argc, char **argv)
gpg_error_t err;
int any_options = 0;
int opt_tor = 0;
- int opt_new_circuit = 0;
int opt_cert = 0;
int opt_srv = 0;
int opt_bracket = 0;
@@ -103,11 +102,6 @@ main (int argc, char **argv)
opt_tor = 1;
argc--; argv++;
}
- else if (!strcmp (*argv, "--new-circuit"))
- {
- opt_new_circuit = 1;
- argc--; argv++;
- }
else if (!strcmp (*argv, "--standard-resolver"))
{
enable_standard_resolver (1);
@@ -171,15 +165,7 @@ main (int argc, char **argv)
init_sockets ();
if (opt_tor)
- {
- err = enable_dns_tormode (opt_new_circuit);
- if (err)
- {
- fprintf (stderr, "error switching into Tor mode: %s\n",
- gpg_strerror (err));
- exit (1);
- }
- }
+ enable_dns_tormode (0);
if (opt_cert)
{