aboutsummaryrefslogtreecommitdiffstats
path: root/dirmngr/dirmngr.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2022-02-01 15:02:20 +0000
committerWerner Koch <[email protected]>2022-02-01 15:03:06 +0000
commit57d546674d081b9a4cd5d9281ea34cb5c85d2830 (patch)
treec6f7bb7e8f75a9e5be29d293e2b9faf9a5f7a882 /dirmngr/dirmngr.c
parentsm: Partly revert last commit. (diff)
downloadgnupg-57d546674d081b9a4cd5d9281ea34cb5c85d2830.tar.gz
gnupg-57d546674d081b9a4cd5d9281ea34cb5c85d2830.zip
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
Diffstat (limited to 'dirmngr/dirmngr.c')
-rw-r--r--dirmngr/dirmngr.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/dirmngr/dirmngr.c b/dirmngr/dirmngr.c
index 21aaecef7..dec5c57d9 100644
--- a/dirmngr/dirmngr.c
+++ b/dirmngr/dirmngr.c
@@ -620,6 +620,15 @@ dirmngr_use_tor (void)
}
+/* This is somewhat similar to dirmngr_use_tor but avoids a trial
+ * connect and may thus be faster for this special case. */
+int
+dirmngr_never_use_tor_p (void)
+{
+ return tor_mode == TOR_MODE_NEVER;
+}
+
+
static void
wrong_args (const char *text)
{