mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
dirmngr: Add command to print the resolver version.
* dirmngr/server.c (cmd_getinfo): Add sub-command "dnsinfo".
This commit is contained in:
parent
28c53ddbcb
commit
4ff2cae7de
@ -2190,6 +2190,7 @@ static const char hlp_getinfo[] =
|
||||
"version - Return the version of the program.\n"
|
||||
"pid - Return the process id of the server.\n"
|
||||
"tor - Return OK if running in Tor mode\n"
|
||||
"dnsinfo - Return info about the DNS resolver\n"
|
||||
"socket_name - Return the name of the socket.\n";
|
||||
static gpg_error_t
|
||||
cmd_getinfo (assuan_context_t ctx, char *line)
|
||||
@ -2235,6 +2236,17 @@ cmd_getinfo (assuan_context_t ctx, char *line)
|
||||
else
|
||||
err = set_error (GPG_ERR_FALSE, "Tor mode is NOT enabled");
|
||||
}
|
||||
else if (!strcmp (line, "dnsinfo"))
|
||||
{
|
||||
#if USE_ADNS && HAVE_ADNS_IF_TORMODE
|
||||
assuan_set_okay_line (ctx, "- ADNS with Tor support");
|
||||
#elif USE_ADNS
|
||||
assuan_set_okay_line (ctx, "- ADNS w/o Tor support");
|
||||
#else
|
||||
assuan_set_okay_line (ctx, "- System resolver w/o Tor support");
|
||||
#endif
|
||||
err = 0;
|
||||
}
|
||||
else
|
||||
err = set_error (GPG_ERR_ASS_PARAMETER, "unknown value for WHAT");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user