mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
dirmngr: Print a SOURCE status for WKD requests.
* dirmngr/server.c (cmd_wkd_get): Print a SOURCE status. -- This status allows to see whether the the WKD requests has been resolved from the standard address or from a SRV record derived one. We return only host and port and not the .well-known suffix because that is obvious. HTTP redirects are not taken in account because they may chnage at any time due to load balancing etc and not relevant for gpg which may use the URL to detect changes in the WKD results. For example my current setup returns S SOURCE https://wkd.gnupg.org for wk@gnupg.org. Without a SRV record S SOURCE https://gnupg.org would have been returned. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
9b88cfa096
commit
e975482239
@ -896,7 +896,6 @@ cmd_wkd_get (assuan_context_t ctx, char *line)
|
||||
}
|
||||
}
|
||||
xfree (srvs);
|
||||
log_debug ("srv: got '%s%s'\n", domain, portstr);
|
||||
}
|
||||
|
||||
gcry_md_hash_buffer (GCRY_MD_SHA1, sha1buf, mbox, strlen (mbox));
|
||||
@ -932,6 +931,13 @@ cmd_wkd_get (assuan_context_t ctx, char *line)
|
||||
encodedhash,
|
||||
NULL);
|
||||
no_log = 1;
|
||||
if (uri)
|
||||
{
|
||||
err = dirmngr_status_printf (ctrl, "SOURCE", "https://%s%s",
|
||||
domain, portstr);
|
||||
if (err)
|
||||
goto leave;
|
||||
}
|
||||
}
|
||||
if (!uri)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user