aboutsummaryrefslogtreecommitdiffstats
path: root/dirmngr/server.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2015-11-09 19:44:13 +0000
committerWerner Koch <[email protected]>2015-11-09 19:44:13 +0000
commit288c9919dc45496b2380eeac487a8539692d6842 (patch)
treefcb02fb3741d0fc819fa97b9541437e951bd90ea /dirmngr/server.c
parentdirmngr: Improve detection of ADNS. (diff)
downloadgnupg-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/server.c')
-rw-r--r--dirmngr/server.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/dirmngr/server.c b/dirmngr/server.c
index 74e00fb2b..ba3750869 100644
--- a/dirmngr/server.c
+++ b/dirmngr/server.c
@@ -714,10 +714,10 @@ cmd_dns_cert (assuan_context_t ctx, char *line)
}
}
- if (opt.use_tor && enable_dns_tormode ())
+ if (opt.use_tor && (err = enable_dns_tormode (0)))
{
/* Tor mode is requested but the DNS code can't enable it. */
- err = gpg_error (GPG_ERR_FORBIDDEN);
+ assuan_set_error (ctx, err, "error enabling Tor mode");
goto leave;
}