dirmngr: New option --resolver-timeout.
authorWerner Koch <wk@gnupg.org>
Tue, 20 Dec 2016 08:53:58 +0000 (09:53 +0100)
committerWerner Koch <wk@gnupg.org>
Tue, 20 Dec 2016 08:53:58 +0000 (09:53 +0100)
commit81c012787fabf734d9c952c6f18ecac21929d4d8
treea69f7064a65d66c5f623eb11d272f173e4f8f08f
parentaf8b68fae39b1378c769e0de6ba6437ea1aac7e3
dirmngr: New option --resolver-timeout.

* dirmngr/dns-stuff.c (DEFAULT_TIMEOUT): New.
(opt_timeout): New var.
(set_dns_timeout): New.
(libdns_res_open): Set the default timeout.
(libdns_res_wait): Use configurable timeout.
(resolve_name_libdns): Ditto.

* dirmngr/dirmngr.c (oResolverTimeout): New const.
(opts): New option --resolver-timeout.
(parse_rereadable_options): Set that option.
(main) <aGPGConfList>: Add --nameserver and --resolver-timeout.
* tools/gpgconf-comp.c (gc_options_dirmngr): Add --resolver-timeout
and --nameserver.

* dirmngr/http.c (connect_server): Fix yesterday introduced bug in
error diagnostic.
--

This timeout is a pretty crude thing because libdns has a few other
internal timeouts as well.

Signed-off-by: Werner Koch <wk@gnupg.org>
dirmngr/dirmngr.c
dirmngr/dns-stuff.c
dirmngr/dns-stuff.h
dirmngr/http.c
dirmngr/t-dns-stuff.c
doc/dirmngr.texi
tools/gpgconf-comp.c