diff options
author | Werner Koch <[email protected]> | 2015-12-02 10:49:41 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2015-12-02 11:27:35 +0000 |
commit | 28e2513721ff0cec920564d4087f3600cce8672e (patch) | |
tree | 2b1bc0386b58dc38ae85506976b5f873a68ef150 /g10 | |
parent | http: Enhance parser to detect .onion addresses. (diff) | |
download | gnupg-28e2513721ff0cec920564d4087f3600cce8672e.tar.gz gnupg-28e2513721ff0cec920564d4087f3600cce8672e.zip |
dirmngr: Switch to an onion address if Tor is running.
* dirmngr/dirmngr.h (opt): Turn field 'keyserver' into an strlist.
* dirmngr/dirmngr.c (parse_rereadable_options): Allow multiple
--keyserver options.
* dirmngr/server.c (server_local_s): Add field 'tor_state'.
(release_uri_item_list): New.
(release_ctrl_keyservers): Use it.
(start_command_handler): Release list of keyservers.
(is_tor_running): New.
(cmd_getinfo): Re-implement "tor" subcommand using new fucntion.
(ensure_keyserver): Rewrite.
* g10/dirmngr-conf.skel: Add two keyserver options.
--
This feature is independent of --use-tor and automagically uses Tor if
available. The dirmngr.conf file needs to specify two keyservers to
make this work. For new installations this is done using the skeleton
file. This feature requires the Libassuan 2.4.2 to work.
This patch also fixes a memory leak of opt.keyserver en passant.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'g10')
-rw-r--r-- | g10/dirmngr-conf.skel | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/g10/dirmngr-conf.skel b/g10/dirmngr-conf.skel index 2ba5e4dac..d5a02d949 100644 --- a/g10/dirmngr-conf.skel +++ b/g10/dirmngr-conf.skel @@ -49,7 +49,12 @@ # servers via DNS round-robin. hkp://keys.gnupg.net is an example of # such a "server", which spreads the load over a number of physical # servers. +# +# If exactly two keyservers are configured and only one is a Tor hidden +# service, Dirmngr selects the keyserver to use depending on whether +# Tor is locally running or not (on a per session base). +keyserver hkp://dyh2j3qyrirn43iw.onion keyserver hkp://keys.gnupg.net # --hkp-cacert FILENAME |