diff options
author | Werner Koch <[email protected]> | 2016-12-01 14:45:51 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2016-12-01 15:40:32 +0000 |
commit | 304566d3327ef0a85188cce3109d46d5ff47177a (patch) | |
tree | c352a95f0b6bdbe6fca8d4aec1bfea9a7418f388 /dirmngr/dns-stuff.h | |
parent | gpg: Let only Dirmngr decide whether CERT is supported. (diff) | |
download | gnupg-304566d3327ef0a85188cce3109d46d5ff47177a.tar.gz gnupg-304566d3327ef0a85188cce3109d46d5ff47177a.zip |
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 <[email protected]>
Diffstat (limited to 'dirmngr/dns-stuff.h')
-rw-r--r-- | dirmngr/dns-stuff.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/dirmngr/dns-stuff.h b/dirmngr/dns-stuff.h index 10e6d8d91..c3c094611 100644 --- a/dirmngr/dns-stuff.h +++ b/dirmngr/dns-stuff.h @@ -92,6 +92,14 @@ struct srventry }; +/* Calling this function with YES set to True forces the use of the + * standard resolver even if dirmngr has been built with support for + * an alternative resolver. */ +void enable_standard_resolver (int yes); + +/* Return true if the standard resolver is used. */ +int standard_resolver_p (void); + /* Calling this function switches the DNS code into Tor mode if possibe. Return 0 on success. */ gpg_error_t enable_dns_tormode (int new_circuit); |