mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
dirmngr: Make --use-tor work - still leaks DNS.
* dirmngr/dirmngr.c (set_tor_mode): New. (main, reread_configuration): Call it. * dirmngr/http.c (http_raw_connect, send_request): Check whether TOR mode is enabled if the FORCE_TOR flag is given. -- The patch for http.c is a sanity check because tor mode is anyway global as long as the Assuan socket wrappers are used. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
8c609eaf35
commit
6983fd131f
3 changed files with 36 additions and 9 deletions
|
@ -751,8 +751,13 @@ http_raw_connect (http_t *r_hd, const char *server, unsigned short port,
|
|||
|
||||
if ((flags & HTTP_FLAG_FORCE_TOR))
|
||||
{
|
||||
log_error ("TOR support is not yet available\n");
|
||||
return gpg_err_make (default_errsource, GPG_ERR_NOT_IMPLEMENTED);
|
||||
int mode;
|
||||
|
||||
if (assuan_sock_get_flag (ASSUAN_INVALID_FD, "tor-mode", &mode) || !mode)
|
||||
{
|
||||
log_error ("TOR support is not available\n");
|
||||
return gpg_err_make (default_errsource, GPG_ERR_NOT_IMPLEMENTED);
|
||||
}
|
||||
}
|
||||
|
||||
/* Create the handle. */
|
||||
|
@ -1466,8 +1471,13 @@ send_request (http_t hd, const char *httphost, const char *auth,
|
|||
|
||||
if ((hd->flags & HTTP_FLAG_FORCE_TOR))
|
||||
{
|
||||
log_error ("TOR support is not yet available\n");
|
||||
return gpg_err_make (default_errsource, GPG_ERR_NOT_IMPLEMENTED);
|
||||
int mode;
|
||||
|
||||
if (assuan_sock_get_flag (ASSUAN_INVALID_FD, "tor-mode", &mode) || !mode)
|
||||
{
|
||||
log_error ("TOR support is not available\n");
|
||||
return gpg_err_make (default_errsource, GPG_ERR_NOT_IMPLEMENTED);
|
||||
}
|
||||
}
|
||||
|
||||
server = *hd->uri->host ? hd->uri->host : "localhost";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue