diff options
author | Werner Koch <[email protected]> | 2019-03-11 17:15:05 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2019-03-11 17:15:05 +0000 |
commit | 9f37e93dd741a5436ff412955628806ae84725ca (patch) | |
tree | 9442610c214ffa7858c5299f9be502c6865c2dfd /dirmngr/dirmngr.c | |
parent | common: Minor rework of tty_get. (diff) | |
download | gnupg-9f37e93dd741a5436ff412955628806ae84725ca.tar.gz gnupg-9f37e93dd741a5436ff412955628806ae84725ca.zip |
dirmngr: Avoid testing for Tor with --gpgconf-list.
* dirmngr/dirmngr.c (post_option_parsing): Do not call set_tor_mode.
(dirmngr_sighup_action): Call it here.
(main): Call it here unless in --gpgconf-list mode.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'dirmngr/dirmngr.c')
-rw-r--r-- | dirmngr/dirmngr.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/dirmngr/dirmngr.c b/dirmngr/dirmngr.c index 5b9e7a86e..3a99a2e2e 100644 --- a/dirmngr/dirmngr.c +++ b/dirmngr/dirmngr.c @@ -763,7 +763,6 @@ post_option_parsing (void) opt.connect_quick_timeout = opt.connect_timeout; set_debug (); - set_tor_mode (); } @@ -1090,7 +1089,12 @@ main (int argc, char **argv) log_printf ("\n"); } + /* Note that we do not run set_tor_mode in --gpgconf-list mode + * because it will attempt to connect to the tor client and that can + * be time consuming. */ post_option_parsing (); + if (cmd != aGPGConfTest && cmd != aGPGConfList) + set_tor_mode (); /* Get LDAP server list from file. */ #if USE_LDAP @@ -1864,6 +1868,7 @@ dirmngr_sighup_action (void) log_info (_("SIGHUP received - " "re-reading configuration and flushing caches\n")); reread_configuration (); + set_tor_mode (); cert_cache_deinit (0); crl_cache_deinit (); cert_cache_init (hkp_cacert_filenames); |