summaryrefslogtreecommitdiffstats
path: root/tools/gpg-wks-server.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2018-02-20 09:00:00 +0100
committerWerner Koch <wk@gnupg.org>2018-02-20 09:00:00 +0100
commit1877603761911ea5b1c15f4aef11a2cf86a8682c (patch)
tree034bac693c9aca59b5ad90876514179316f951a1 /tools/gpg-wks-server.c
parentspeedo: Use --enable-wks-tools for non-W32 builds. (diff)
downloadgnupg2-1877603761911ea5b1c15f4aef11a2cf86a8682c.tar.xz
gnupg2-1877603761911ea5b1c15f4aef11a2cf86a8682c.zip
wks: Support alternative submission address.
* tools/gpg-wks.h (policy_flags_s): Add field 'submission_address'. * tools/wks-util.c (wks_parse_policy): Parse that field. (wks_free_policy): New. * tools/gpg-wks-client.c (command_send): Also try to take the submission-address from the policy file. Free POLICY. * tools/gpg-wks-server.c (process_new_key): Free POLICYBUF. (command_list_domains): Free POLICY. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'tools/gpg-wks-server.c')
-rw-r--r--tools/gpg-wks-server.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/gpg-wks-server.c b/tools/gpg-wks-server.c
index 0b1d64261..008c26639 100644
--- a/tools/gpg-wks-server.c
+++ b/tools/gpg-wks-server.c
@@ -1135,6 +1135,8 @@ process_new_key (server_ctx_t ctx, estream_t key)
char *fname = NULL;
struct policy_flags_s policybuf;
+ memset (&policybuf, 0, sizeof policybuf);
+
/* First figure out the user id from the key. */
xfree (ctx->fpr);
free_uidinfo_list (ctx->mboxes);
@@ -1206,6 +1208,7 @@ process_new_key (server_ctx_t ctx, estream_t key)
xfree (nonce);
xfree (fname);
xfree (dname);
+ wks_free_policy (&policybuf);
return err;
}
@@ -1897,6 +1900,7 @@ command_list_domains (void)
if (!memcmp (&empty_policy, &policy, sizeof policy))
log_error ("domain %s: empty policy file\n", domain);
}
+ wks_free_policy (&policy);
}