diff options
author | Werner Koch <wk@gnupg.org> | 2016-09-02 16:54:42 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2016-09-02 16:56:04 +0200 |
commit | 46362cbc0e2260e989820795a6e4245c72335172 (patch) | |
tree | 9e21a8b9bd0e2e2bdebcd388f702d4c20b6c3c47 /tools/gpg-wks.h | |
parent | dirmngr: Add --policy-flags option to WKD_GET. (diff) | |
download | gnupg2-46362cbc0e2260e989820795a6e4245c72335172.tar.xz gnupg2-46362cbc0e2260e989820795a6e4245c72335172.zip |
wks: Add framework for policy flags.
* tools/call-dirmngr.c (wkd_get_policy_flags): New.
* tools/gpg-wks.h (struct policy_flags_s, policy_flags_t): New.
* tools/wks-util.c (wks_parse_policy): New.
* tools/gpg-wks-client.c (command_send): Get the policy flags to show
a new info line.
* tools/gpg-wks-server.c (get_policy_flags): New.
(process_new_key): get policy flag and add a stub for "auth-submit".
(command_list_domains): Check policy flags.
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'tools/gpg-wks.h')
-rw-r--r-- | tools/gpg-wks.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/gpg-wks.h b/tools/gpg-wks.h index be85eecfb..85000cc71 100644 --- a/tools/gpg-wks.h +++ b/tools/gpg-wks.h @@ -46,8 +46,22 @@ struct #define DBG_EXTPROG_VALUE 16384 /* debug external program calls */ +/* The parsed policy flags. */ +struct policy_flags_s +{ + unsigned int mailbox_only : 1; + unsigned int dane_only : 1; + unsigned int auth_submit : 1; + unsigned int max_pending; /* Seconds to wait for a confirmation. */ +}; +typedef struct policy_flags_s *policy_flags_t; + + + /*-- wks-util.c --*/ gpg_error_t wks_send_mime (mime_maker_t mime); +gpg_error_t wks_parse_policy (policy_flags_t flags, estream_t stream, + int ignore_unknown); /*-- wks-receive.c --*/ gpg_error_t wks_receive (estream_t fp, |