]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
dnssec-dsfromkey should not convert revoked keys
authorTony Finch <dot@dotat.at>
Mon, 4 Oct 2021 23:01:54 +0000 (10:01 +1100)
committerMark Andrews <marka@isc.org>
Tue, 30 Nov 2021 11:11:03 +0000 (22:11 +1100)
it is pointless to convert revoked keys to DS or CDS records as
they cannot be used to provide a cryptographic link from the parent
zone.

(cherry picked from commit 04a5529c2da2187dde4cfce656fee023d55b1b47)

bin/dnssec/dnssec-dsfromkey.c
bin/dnssec/dnssec-dsfromkey.rst
doc/man/dnssec-dsfromkey.8in

index 75ef21f2d394beab620aceb1a3e094f635fadf02..f089bbbbaa89795d0f560898706e22c61dea54cc 100644 (file)
@@ -262,6 +262,10 @@ emit(dns_dsdigest_t dt, bool showall, bool cds, dns_rdata_t *rdata) {
                fatal("can't convert DNSKEY");
        }
 
+       if ((dnskey.flags & DNS_KEYFLAG_REVOKE) != 0) {
+               return;
+       }
+
        if ((dnskey.flags & DNS_KEYFLAG_KSK) == 0 && !showall) {
                return;
        }
index 35d62c0bcbeab7652e529a5052ffe7d17227dba1..4d68ca80efa7be353b22ebb0b9e780a9ce05e25b 100644 (file)
@@ -43,6 +43,10 @@ Description
 The ``dnssec-dsfromkey`` command outputs DS (Delegation Signer) resource records
 (RRs), or CDS (Child DS) RRs with the ``-C`` option.
 
+By default, only KSKs are converted (keys with flags = 257).  The
+``-A`` option includes ZSKs (flags = 256).  Revoked keys are never
+included.
+
 The input keys can be specified in a number of ways:
 
 By default, ``dnssec-dsfromkey`` reads a key file named in the format
index 65b4122e187155f1ca0a4d5a55ca9dece5bdd03d..75d7888a0a3605007d61ceaf4181c518f5e41333 100644 (file)
@@ -44,6 +44,10 @@ dnssec-dsfromkey \- DNSSEC DS RR generation tool
 The \fBdnssec\-dsfromkey\fP command outputs DS (Delegation Signer) resource records
 (RRs), or CDS (Child DS) RRs with the \fB\-C\fP option.
 .sp
+By default, only KSKs are converted (keys with flags = 257).  The
+\fB\-A\fP option includes ZSKs (flags = 256).  Revoked keys are never
+included.
+.sp
 The input keys can be specified in a number of ways:
 .sp
 By default, \fBdnssec\-dsfromkey\fP reads a key file named in the format