]> git.ipfire.org Git - thirdparty/bind9.git/commit
Fix a kasp system test bug
authorMatthijs Mekking <matthijs@isc.org>
Thu, 28 Apr 2022 14:45:33 +0000 (16:45 +0200)
committerMatthijs Mekking <matthijs@isc.org>
Fri, 29 Apr 2022 11:38:09 +0000 (13:38 +0200)
commit3e1d09ac665e835ab4f46357e91b5cde50a441d7
tree70240206d34517c9f8b2f032d0e67cb48fcf190e
parent2b34b326fcdb1685246f072b73f7f19416eb3b08
Fix a kasp system test bug

In '_check_apex_dnskey' we check for each key (KEY1 to KEY4) if they
are present in the DNSKEY RRset if they should be.

However, we only grep the dig output for the first seven fields (owner,
ttl, class, type, flags, protocol, algorithm). This can be the same
for different keys.

For example, KEY1 may be KSK predecessor and KEY2 a KSK successor,
both DNSKEY records for these keys are the same up to the public key
field. This can cause test failures if KEY1 needs to be present, but
KEY2 not, because when grepping for KEY2 we will falsely detect the
key to be present (because the grep matches KEY1).

Fix the function by grepping looking for the first seven fields in the
corresponding key file and retrieve the public key part. Grep for this
in the dig output.
bin/tests/system/kasp.sh