aboutsummaryrefslogtreecommitdiffstats
path: root/tools/wks-util.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/wks-util.c')
-rw-r--r--tools/wks-util.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/tools/wks-util.c b/tools/wks-util.c
index 46ad5c27b..45237b2b4 100644
--- a/tools/wks-util.c
+++ b/tools/wks-util.c
@@ -316,7 +316,8 @@ wks_parse_policy (policy_flags_t flags, estream_t stream, int ignore_unknown)
TOK_MAILBOX_ONLY,
TOK_DANE_ONLY,
TOK_AUTH_SUBMIT,
- TOK_MAX_PENDING
+ TOK_MAX_PENDING,
+ TOK_PROTOCOL_VERSION
};
static struct {
const char *name;
@@ -325,7 +326,8 @@ wks_parse_policy (policy_flags_t flags, estream_t stream, int ignore_unknown)
{ "mailbox-only", TOK_MAILBOX_ONLY },
{ "dane-only", TOK_DANE_ONLY },
{ "auth-submit", TOK_AUTH_SUBMIT },
- { "max-pending", TOK_MAX_PENDING }
+ { "max-pending", TOK_MAX_PENDING },
+ { "protocol-version", TOK_PROTOCOL_VERSION }
};
gpg_error_t err = 0;
int lnr = 0;
@@ -400,6 +402,14 @@ wks_parse_policy (policy_flags_t flags, estream_t stream, int ignore_unknown)
* and decide whether to allow other units. */
flags->max_pending = atoi (value);
break;
+ case TOK_PROTOCOL_VERSION:
+ if (!value)
+ {
+ err = gpg_error (GPG_ERR_SYNTAX);
+ goto leave;
+ }
+ flags->protocol_version = atoi (value);
+ break;
}
}