1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

dirmngr: Avoid initial delay on the first keyserver access.

* dirmngr/dirmngr.c (dirmngr_never_use_tor_p): New.
* dirmngr/server.c (ensure_keyserver): Don't even test for the Tor
proxy in never-use-tor Mode.

* tools/gpgtar-create.c: Include unistd.h to avoid a warning on
Windows.
--

This delay of 2 or 3 seconds is in particular annoying on Windows.
This is now suppressed, as it should be, if --no-use-tor is used.

The second patch is unrelated
This commit is contained in:
Werner Koch 2022-02-01 16:02:20 +01:00
parent d426ed66ac
commit dde88897e2
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
4 changed files with 13 additions and 3 deletions

View file

@ -2276,7 +2276,7 @@ ensure_keyserver (ctrl_t ctrl)
{
/* If there is just one onion and one plain keyserver given, we take
only one depending on whether Tor is running or not. */
if (is_tor_running (ctrl))
if (!dirmngr_never_use_tor_p () && is_tor_running (ctrl))
{
ctrl->server_local->keyservers = onion_items;
onion_items = NULL;
@ -2287,7 +2287,7 @@ ensure_keyserver (ctrl_t ctrl)
plain_items = NULL;
}
}
else if (!is_tor_running (ctrl))
else if (dirmngr_never_use_tor_p () || !is_tor_running (ctrl))
{
/* Tor is not running. It does not make sense to add Onion
addresses. */