summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2017-06-08 09:30:48 +0200
committerWerner Koch <wk@gnupg.org>2017-06-08 09:37:36 +0200
commit9b43220b8ad1a5c1cd51de3bbfff7ccbcc3fa877 (patch)
tree6ef342f715e143c390eff68629d909e94f6cbd6f /doc
parentdirmngr: Allow a timeout for HTTP and other TCP connects. (diff)
downloadgnupg2-9b43220b8ad1a5c1cd51de3bbfff7ccbcc3fa877.tar.xz
gnupg2-9b43220b8ad1a5c1cd51de3bbfff7ccbcc3fa877.zip
dirmngr: Implement HTTP connect timeouts of 15 or 2 seconds.
* dirmngr/dirmngr.c (oConnectTimeout, oConnectQuickTimeout): New enums. (opts): New options --connect-timeout and --connect-quick-timeout. (DEFAULT_CONNECT_TIMEOUT): New. (DEFAULT_CONNECT_QUICK_TIMEOUT): New. (parse_rereadable_options): Handle new options. (post_option_parsing): New. Use instead of direct calls to set_debug() and set_tor_mode (). (main): Setup default timeouts. (dirmngr_init_default_ctrl): Set standard connect timeout. * dirmngr/dirmngr.h (opt): New fields connect_timeout and connect_quick_timeout. (server_control_s): New field timeout. * dirmngr/ks-engine-finger.c (ks_finger_fetch): Pass timeout to http_raw_connect. * dirmngr/ks-engine-hkp.c (send_request): Call http_session_set_timeout. * dirmngr/ks-engine-http.c (ks_http_fetch): Ditto. * dirmngr/server.c (cmd_wkd_get, cmd_ks_search, cmd_ks_get) (cmd_ks_fetch): Implement --quick option. -- The standard connect timeouts are way to long so we add a timeout to the connect calls. Also implement the --quick option which is already used by gpg for non-important requests (e.g. looking up a key for verification). Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'doc')
-rw-r--r--doc/dirmngr.texi13
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/dirmngr.texi b/doc/dirmngr.texi
index 22a794316..64b24f9f7 100644
--- a/doc/dirmngr.texi
+++ b/doc/dirmngr.texi
@@ -260,9 +260,22 @@ Implemented'' if this function is used.
When possible use a recursive resolver instead of a stub resolver.
@item --resolver-timeout @var{n}
+@opindex resolver-timeout
Set the timeout for the DNS resolver to N seconds. The default are 30
seconds.
+@item --connect-timeout @var{n}
+@item --connect-quick-timeout @var{n}
+@opindex connect-timeout
+@opindex connect-quick-timeout
+Set the timeout for HTTP and generic TCP connection attempts to N
+seconds. The value set with the quick variant is used when the
+--quick option has been given to certain Assuan commands. The quick
+value is capped at the value of the regular connect timeout. The
+default values are 15 and 2 seconds. Note that the timeout values are
+for each connection attempt; the connection code will attempt to
+connect all addresses listed for a server.
+
@item --allow-version-check
@opindex allow-version-check
Allow Dirmngr to connect to @code{https://versions.gnupg.org} to get