]> git.ipfire.org Git - thirdparty/bind9.git/commit
Fix a small keymgr bug
authorMatthijs Mekking <matthijs@isc.org>
Tue, 25 Feb 2025 07:40:33 +0000 (08:40 +0100)
committerMatthijs Mekking <matthijs@isc.org>
Thu, 20 Mar 2025 10:12:16 +0000 (10:12 +0000)
commitef671919d539d3cc41b2fbd276cae0ef017d2891
tree1c160fe2a01d6dbcba1ee11c74efbfbf78f426b6
parent329a3327083f08769462111e7c7e612b866f0a4b
Fix a small keymgr bug

While converting the kasp system test to pytest, I encountered a small
bug in the keymgr code. We retire keys when there is more than one
key matching a 'keys' line from the dnssec-policy. But if there are
multiple identical 'keys' lines, as is the case for the test zone
'checkds-doubleksk.kasp', we retire one of the two keys that have the
same properties.

Fix this by checking if there are double matches. This is not fool proof
because there may be many keys for a few identical 'keys' lines, but it
is good enough for now. In practice it makes no sense to have a policy
that dictates multiple keys with identical properties.
lib/dns/keymgr.c