[Pkg-gnupg-commit] [gnupg2] 55/118: dirmngr: Add --policy-flags option to WKD_GET.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Thu Sep 15 18:25:08 UTC 2016
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch encoding-and-speling
in repository gnupg2.
commit 505ee45106d6aa2902bbdd6326f8eb7527c273c4
Author: Werner Koch <wk at gnupg.org>
Date: Fri Sep 2 16:52:17 2016 +0200
dirmngr: Add --policy-flags option to WKD_GET.
* dirmngr/server.c (cmd_wkd_get): Add new option.
Signed-off-by: Werner Koch <wk at gnupg.org>
---
dirmngr/server.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/dirmngr/server.c b/dirmngr/server.c
index 3ac4160..03adc61 100644
--- a/dirmngr/server.c
+++ b/dirmngr/server.c
@@ -794,10 +794,10 @@ cmd_dns_cert (assuan_context_t ctx, char *line)
static const char hlp_wkd_get[] =
- "WKD_GET [--submission-address] <user_id>\n"
+ "WKD_GET [--submission-address|--policy-flags] <user_id>\n"
"\n"
- "Return the key or the submission address for <user_id>\n"
- "from a Web Key Directory.";
+ "Return the key or other info for <user_id>\n"
+ "from the Web Key Directory.";
static gpg_error_t
cmd_wkd_get (assuan_context_t ctx, char *line)
{
@@ -809,8 +809,10 @@ cmd_wkd_get (assuan_context_t ctx, char *line)
char *uri = NULL;
char *encodedhash = NULL;
int opt_submission_addr;
+ int opt_policy_flags;
opt_submission_addr = has_option (line, "--submission-address");
+ opt_policy_flags = has_option (line, "--policy-flags");
line = skip_options (line);
mbox = mailbox_from_userid (line);
@@ -836,6 +838,13 @@ cmd_wkd_get (assuan_context_t ctx, char *line)
"/.well-known/openpgpkey/submission-address",
NULL);
}
+ else if (opt_policy_flags)
+ {
+ uri = strconcat ("https://",
+ domain,
+ "/.well-known/openpgpkey/policy",
+ NULL);
+ }
else
{
uri = strconcat ("https://",
--
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