--- /dev/null
+/*
+ * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+ *
+ * SPDX-License-Identifier: MPL-2.0
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, you can obtain one at https://mozilla.org/MPL/2.0/.
+ *
+ * See the COPYRIGHT file distributed with this work for additional
+ * information regarding copyright ownership.
+ */
+
+/*
+ * The dnssec-policy jitter is more than signatures-validity,
+ * which is not allowed.
+ */
+dnssec-policy high-jitter {
+ signatures-jitter P8DT1S;
+ signatures-validity P8D;
+};
+
+zone "example.net" {
+ type primary;
+ file "example.db";
+ dnssec-policy high-jitter;
+};
vary the validity interval of individual signatures. The validity of a
newly generated signatures is in range between :any:`signatures-validity`
(maximum) and :any:`signatures-validity` minus :any:`signatures-jitter`
- (minimum). The default jitter is 12 hours.
+ (minimum). The default jitter is 12 hours and the configured value must
+ be lower than :any:`signatures-validity` and
+ :any:`signatures-validity-dnskey`.
.. namedconf:statement:: signatures-refresh
:tags: dnssec
if (kasp != NULL) {
jitter = dns_kasp_sigjitter(kasp);
sigvalidity = dns_kasp_sigvalidity(kasp);
+ INSIST(jitter <= sigvalidity);
+ }
+
+ if (jitter > sigvalidity) {
+ jitter = sigvalidity;
}
if (sigvalidity >= 3600U) {
if (zone->kasp != NULL) {
jitter = dns_kasp_sigjitter(zone->kasp);
sigvalidity = dns_kasp_sigvalidity(zone->kasp);
+ INSIST(jitter <= sigvalidity);
+ }
+
+ if (jitter > sigvalidity) {
+ jitter = sigvalidity;
}
*inception = now - 3600; /* Allow for clock skew. */
}
dns_kasp_setsigvalidity_dnskey(kasp, sigvalidity);
+ if (sigjitter > sigvalidity) {
+ cfg_obj_log(
+ config, logctx, ISC_LOG_ERROR,
+ "dnssec-policy: policy '%s' signatures-jitter cannot "
+ "be larger than signatures-validity-dnskey",
+ kaspname);
+ result = ISC_R_FAILURE;
+ }
+
sigvalidity = get_duration(maps, "signatures-validity",
DNS_KASP_SIG_VALIDITY);
if (sigrefresh >= (sigvalidity * 0.9)) {
}
dns_kasp_setsigvalidity(kasp, sigvalidity);
+ if (sigjitter > sigvalidity) {
+ cfg_obj_log(
+ config, logctx, ISC_LOG_ERROR,
+ "dnssec-policy: policy '%s' signatures-jitter cannot "
+ "be larger than signatures-validity",
+ kaspname);
+ result = ISC_R_FAILURE;
+ }
+
if (result != ISC_R_SUCCESS) {
goto cleanup;
}