]> 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 10:48:17 +0000 (21:48 +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.

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

index 0214e72579f3b5d11ce4bacd7f723fc469c61ece..8cb3f41bbf0b8fc501950750368e0e60d3947b51 100644 (file)
@@ -260,6 +260,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 75684f1ea176ab66630011efbe3681137b7bd46d..6964eaacee2ff6cb90d7365de7d10af3d962d851 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