1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

dirmngr: New option --nameserver.

* dirmngr/dirmngr.c (oNameServer): New.
(opts): Add --nameserver.
(parse_rereadable_options): Act upon oNameServer.
* dirmngr/dns-stuff.c (DEFAULT_NAMESERVER): New.
(tor_nameserver): New.
(set_dns_nameserver): New.
(my_adns_init): Make name server configurable.

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2015-11-12 13:20:18 +01:00
parent 7546e81879
commit a2cc1d5755
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
4 changed files with 53 additions and 5 deletions

View file

@ -68,6 +68,7 @@
#endif
#include "../common/init.h"
#include "gc-opt-flags.h"
#include "dns-stuff.h"
/* The plain Windows version uses the windows service system. For
example to start the service you may use "sc start dirmngr".
@ -142,6 +143,7 @@ enum cmd_and_opt_values {
oIgnoreCertExtension,
oUseTor,
oKeyServer,
oNameServer,
aTest
};
@ -214,6 +216,7 @@ static ARGPARSE_OPTS opts[] = {
ARGPARSE_s_i (oMaxReplies, "max-replies",
N_("|N|do not return more than N items in one query")),
ARGPARSE_s_s (oNameServer, "nameserver", "@"),
ARGPARSE_s_s (oKeyServer, "keyserver", "@"),
ARGPARSE_s_s (oHkpCaCert, "hkp-cacert",
N_("|FILE|use the CA certificates in FILE for HKP over TLS")),
@ -623,6 +626,10 @@ parse_rereadable_options (ARGPARSE_ARGS *pargs, int reread)
opt.keyserver = *pargs->r.ret_str? xtrystrdup (pargs->r.ret_str) : NULL;
break;
case oNameServer:
set_dns_nameserver (pargs->r.ret_str);
break;
default:
return 0; /* Not handled. */
}