DNSSEC tools read the minimum tag for both bounds of a policy's key tag
range, so generated keys could be accepted outside the configured
range. Return the correct bound and assert the collision check's range
contract so invalid bounds fail instead of disabling validation.
bool
key_collision(dst_key_t *dstkey, dns_name_t *name, const char *dir,
isc_mem_t *mctx, uint16_t min, uint16_t max, bool *exact) {
+ REQUIRE((min == 0 && max == 0) || min < max);
+
isc_result_t result;
bool conflict = false;
dns_dnsseckeylist_t matchkeys;
uint16_t
dns_kasp_key_tagmax(dns_kasp_key_t *key) {
REQUIRE(key != NULL);
- return key->tag_min;
+ return key->tag_max;
}
bool