dirmngr: Tell gpg about WKD looks resulting from a cache.

* dirmngr/server.c (proc_wkd_get): Print new NOTE status
"wkd_cached_result".
* g10/call-dirmngr.c (ks_status_cb): Detect this and print a not ein
verbose mode.
--

This little patch is helpful to see why a WKD change still does not
work after it has been updated on the server.

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2019-12-06 20:04:56 +01:00
parent 1abb39fdaf
commit 8a6ecc6ff5
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
2 changed files with 8 additions and 2 deletions

View File

@ -876,6 +876,7 @@ proc_wkd_get (ctrl_t ctrl, assuan_context_t ctx, char *line)
if (domaininfo_is_wkd_not_supported (domain_orig))
{
err = gpg_error (GPG_ERR_NO_DATA);
dirmngr_status_printf (ctrl, "NOTE", "wkd_cached_result %u", err);
goto leave;
}
}

View File

@ -394,7 +394,7 @@ ks_status_cb (void *opaque, const char *line)
struct ks_status_parm_s *parm = opaque;
gpg_error_t err = 0;
const char *s, *s2;
const char *warn;
const char *warn = NULL;
int is_note = 0;
if ((s = has_leading_keyword (line, parm->keyword? parm->keyword : "SOURCE")))
@ -410,7 +410,12 @@ ks_status_cb (void *opaque, const char *line)
else if ((s = has_leading_keyword (line, "WARNING"))
|| (is_note = !!(s = has_leading_keyword (line, "NOTE"))))
{
if ((s2 = has_leading_keyword (s, "tor_not_running")))
if ((s2 = has_leading_keyword (s, "wkd_cached_result")))
{
if (opt.verbose)
warn = _("WKD uses a cached result");
}
else if ((s2 = has_leading_keyword (s, "tor_not_running")))
warn = _("Tor is not running");
else if ((s2 = has_leading_keyword (s, "tor_config_problem")))
warn = _("Tor is not properly configured");