aboutsummaryrefslogtreecommitdiffstats
path: root/tools/gpg-wks-client.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gpg-wks-client.c')
-rw-r--r--tools/gpg-wks-client.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/tools/gpg-wks-client.c b/tools/gpg-wks-client.c
index 34b26ea8e..c0e34c499 100644
--- a/tools/gpg-wks-client.c
+++ b/tools/gpg-wks-client.c
@@ -447,6 +447,9 @@ command_send (const char *fingerprint, char *userid)
estream_t key = NULL;
char *submission_to = NULL;
mime_maker_t mime = NULL;
+ struct policy_flags_s policy;
+
+ memset (&policy, 0, sizeof policy);
if (classify_user_id (fingerprint, &desc, 1)
|| !(desc.mode == KEYDB_SEARCH_MODE_FPR
@@ -473,6 +476,29 @@ command_send (const char *fingerprint, char *userid)
goto leave;
log_info ("submitting request to '%s'\n", submission_to);
+ /* Get the policy flags. */
+ {
+ estream_t mbuf;
+
+ err = wkd_get_policy_flags (addrspec, &mbuf);
+ if (err)
+ {
+ log_error ("error reading policy flags for '%s': %s\n",
+ submission_to, gpg_strerror (err));
+ goto leave;
+ }
+ if (mbuf)
+ {
+ err = wks_parse_policy (&policy, mbuf, 1);
+ es_fclose (mbuf);
+ if (err)
+ goto leave;
+ }
+ }
+
+ if (policy.auth_submit)
+ log_info ("no confirmation required for '%s'\n", addrspec);
+
/* Send the key. */
err = mime_maker_new (&mime, NULL);
if (err)