[Pkg-gnupg-commit] [gnupg2] 143/185: dirmngr: Print a SOURCE status for WKD requests.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Mon Aug 7 11:55:30 UTC 2017
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch experimental
in repository gnupg2.
commit e97548223948222a5c22acdf3775c7f93c1e17a9
Author: Werner Koch <wk at gnupg.org>
Date: Mon Jul 24 18:21:11 2017 +0200
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 at gnupg.org. Without a SRV record
S SOURCE https://gnupg.org
would have been returned.
Signed-off-by: Werner Koch <wk at gnupg.org>
---
dirmngr/server.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/dirmngr/server.c b/dirmngr/server.c
index 9039534..4f5a3b2 100644
--- a/dirmngr/server.c
+++ b/dirmngr/server.c
@@ -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)
{
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list