diff options
author | Werner Koch <[email protected]> | 2015-11-09 19:44:13 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2015-11-09 19:44:13 +0000 |
commit | 288c9919dc45496b2380eeac487a8539692d6842 (patch) | |
tree | fcb02fb3741d0fc819fa97b9541437e951bd90ea /dirmngr/t-dns-stuff.c | |
parent | dirmngr: Improve detection of ADNS. (diff) | |
download | gnupg-288c9919dc45496b2380eeac487a8539692d6842.tar.gz gnupg-288c9919dc45496b2380eeac487a8539692d6842.zip |
dirmngr: Change to new ADNS Tor mode init scheme.
* dirmngr/dns-stuff.c (tor_credentials): New.
(enable_dns_tormode): Add arg new_circuit and update tor_credentials.
(my_adns_init): Rework to set Tor mode using a config file options and
always use credentials.
* dirmngr/server.c (cmd_dns_cert): Improve error message.
* dirmngr/t-dns-stuff.c (main): Add option --new-circuit.
--
Note that the option --new-circuit in t-dns-stuff is not really useful
because a new circuit is also used for the first call to the function.
Todo: We need to find a policy when to requrest a new curcuit and we
also need to add credentials to the assuan_sock_connect calls.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'dirmngr/t-dns-stuff.c')
-rw-r--r-- | dirmngr/t-dns-stuff.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/dirmngr/t-dns-stuff.c b/dirmngr/t-dns-stuff.c index 191b581b4..303027755 100644 --- a/dirmngr/t-dns-stuff.c +++ b/dirmngr/t-dns-stuff.c @@ -41,6 +41,7 @@ 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; @@ -66,6 +67,7 @@ main (int argc, char **argv) " --verbose print timings etc.\n" " --debug flyswatter\n" " --use-tor use Tor\n" + " --new-circuit use a new Tor circuit\n" " --bracket enclose v6 addresses in brackets\n" " --cert lookup a CERT RR\n" " --srv lookup a SRV RR\n" @@ -89,6 +91,11 @@ 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, "--bracket")) { opt_bracket = 1; @@ -131,7 +138,7 @@ main (int argc, char **argv) if (opt_tor) { - err = enable_dns_tormode (); + err = enable_dns_tormode (opt_new_circuit); if (err) { fprintf (stderr, "error switching into Tor mode: %s\n", |