mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
dirmngr: Print a WARNING status for DNS config problems.
* dirmngr/dirmngr-status.h: New. * dirmngr/dirmngr.h: Include dirmngr-status.h and move some prototypes to that file. * dirmngr/t-support.c: New. * dirmngr/Makefile.am (dirmngr_SOURCES): Add dirmngr-status.h. (t_common_src): Add t-support.c. * dirmngr/server.c (dirmngr_status_printf): Bypass if CTRL is NULL. * dirmngr/dns-stuff.c: Include dirmngr-status.h. (libdns_init): Print WARNING status line. Change call callers to take and pass a CTRL argument. * g10/call-dirmngr.c (ks_status_cb): Print info for new WARNING status. -- To test this you can change RESOLV_CONF_NAME in dns-stuff.c and run gpg --recv-key -v SOMETHING. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
9aa1b368ef
commit
bd4048c533
16 changed files with 196 additions and 93 deletions
|
@ -666,7 +666,7 @@ static const char hlp_dns_cert[] =
|
|||
static gpg_error_t
|
||||
cmd_dns_cert (assuan_context_t ctx, char *line)
|
||||
{
|
||||
/* ctrl_t ctrl = assuan_get_pointer (ctx); */
|
||||
ctrl_t ctrl = assuan_get_pointer (ctx);
|
||||
gpg_error_t err = 0;
|
||||
int pka_mode, dane_mode;
|
||||
char *mbox = NULL;
|
||||
|
@ -782,7 +782,7 @@ cmd_dns_cert (assuan_context_t ctx, char *line)
|
|||
else
|
||||
name = line;
|
||||
|
||||
err = get_dns_cert (name, certtype, &key, &keylen, &fpr, &fprlen, &url);
|
||||
err = get_dns_cert (ctrl, name, certtype, &key, &keylen, &fpr, &fprlen, &url);
|
||||
if (err)
|
||||
goto leave;
|
||||
|
||||
|
@ -883,7 +883,7 @@ proc_wkd_get (ctrl_t ctrl, assuan_context_t ctx, char *line)
|
|||
size_t domainlen, targetlen;
|
||||
int i;
|
||||
|
||||
err = get_dns_srv (domain, "openpgpkey", NULL, &srvs, &srvscount);
|
||||
err = get_dns_srv (ctrl, domain, "openpgpkey", NULL, &srvs, &srvscount);
|
||||
if (err)
|
||||
goto leave;
|
||||
|
||||
|
@ -2977,7 +2977,7 @@ dirmngr_status_printf (ctrl_t ctrl, const char *keyword,
|
|||
va_list arg_ptr;
|
||||
assuan_context_t ctx;
|
||||
|
||||
if (!ctrl->server_local || !(ctx = ctrl->server_local->assuan_ctx))
|
||||
if (!ctrl || !ctrl->server_local || !(ctx = ctrl->server_local->assuan_ctx))
|
||||
return 0;
|
||||
|
||||
va_start (arg_ptr, format);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue