diff options
Diffstat (limited to 'src/knot/dnssec/context.c')
-rw-r--r-- | src/knot/dnssec/context.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/knot/dnssec/context.c b/src/knot/dnssec/context.c index 3413dba..c10e5c6 100644 --- a/src/knot/dnssec/context.c +++ b/src/knot/dnssec/context.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2022 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz> +/* Copyright (C) 2024 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -24,6 +24,7 @@ #include "knot/dnssec/kasp/keystore.h" #include "knot/dnssec/key_records.h" #include "knot/server/dthreads.h" +#include "knot/zone/serial.h" knot_dynarray_define(parent, knot_kasp_parent_t, DYNARRAY_VISIBILITY_NORMAL) @@ -168,6 +169,13 @@ static void policy_load(knot_kasp_policy_t *policy, conf_t *conf, conf_val_t *id policy->unsafe |= conf_opt(&val); conf_val_next(&val); } + + val = conf_id_get(conf, C_POLICY, C_KEYTAG_MODULO, id); + int ret = serial_modulo_parse(conf_str(&val), &policy->keytag_remain, + &policy->keytag_modulo); + if (ret != KNOT_EOK) { + assert(0); // cannot happen - ensured by conf check + } } int kdnssec_ctx_init(conf_t *conf, kdnssec_ctx_t *ctx, const knot_dname_t *zone_name, |