dirmngr: Add option --standard-resolver.
authorWerner Koch <wk@gnupg.org>
Thu, 1 Dec 2016 14:45:51 +0000 (15:45 +0100)
committerWerner Koch <wk@gnupg.org>
Thu, 1 Dec 2016 15:40:32 +0000 (16:40 +0100)
commit304566d3327ef0a85188cce3109d46d5ff47177a
treec352a95f0b6bdbe6fca8d4aec1bfea9a7418f388
parent86efc3ee53abaf1e22b53c1b360c51829e476115
dirmngr: Add option --standard-resolver.

* dirmngr/dirmngr.c (oStandardResolver): New constant.
(opts): New option --standard-resolver.
(parse_rereadable_options): Set option.
* dirmngr/dns-stuff.c: Refactor all code to support the new option.
(standard_resolver): New var.
(enable_standard_resolver, standard_resolver_p): New func.
* dirmngr/http.c (connect_server): Remove USE_DNS_SRV build
conditional.
* dirmngr/ks-engine-hkp.c (map_host): Ditto.
* dirmngr/server.c (cmd_getinfo) <dnsinfo>: Take care of new option
* configure.ac (HAVE_ADNS_IF_TORMODE): Remove var ADNSLIB.  ac_define
USE_ADNS in the adns checking code.  Remove options --disable-dns-srv
and --disable-dns-cert.  Always look for the system resolver.  Print
warning if no system resolver was found.
(USE_DNS_CERT, USE_DNS_SRV): Remove ac_defines.
(HAVE_SYSTEM_RESOLVER): New ac_define.
(USE_DNS_SRV): Remove am_conditional; not used anyway.
--

This option allows for runtime switching to the system's standard
resolver.  This is mainly useful to work around possible bugs in the
optional resolver libraries (as of now ADNS).  Note that on Windows
there is no code to use systems's resolver and thus for full
functionality dirmngr must be build with a separate resolver.

This patch also does way with configure options to disable the use of
CERT and SRV records.

Signed-off-by: Werner Koch <wk@gnupg.org>
configure.ac
dirmngr/dirmngr.c
dirmngr/dns-stuff.c
dirmngr/dns-stuff.h
dirmngr/http.c
dirmngr/ks-engine-hkp.c
dirmngr/server.c
dirmngr/t-dns-stuff.c
doc/dirmngr.texi