From: Aki Tuomi Date: Sat, 26 Dec 2015 17:33:21 +0000 (+0200) Subject: Show DNSSEC keys for slaved zone X-Git-Tag: dnsdist-1.0.0-alpha2~94^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=120b4dc6c9a6b89dc01604bd871a78719d6cf5bc;p=thirdparty%2Fpdns.git Show DNSSEC keys for slaved zone --- diff --git a/pdns/pdnsutil.cc b/pdns/pdnsutil.cc index fe3cec6e33..1a688ee2a0 100644 --- a/pdns/pdnsutil.cc +++ b/pdns/pdnsutil.cc @@ -1129,9 +1129,50 @@ bool showZone(DNSSECKeeper& dk, const DNSName& zone) cerr << "Zone uses following TSIG key(s): " << boost::join(meta, ",") << endl; } - cout <<"Zone is " << (dk.isPresigned(zone) ? "" : "not ") << "presigned"< keys; + DNSResourceRecord rr; - if(keyset.empty()) { + B.lookup(QType(QType::DNSKEY), DNSName(zone)); + while(B.get(rr)) { + if (rr.qtype != QType::DNSKEY) continue; + keys.push_back(*dynamic_cast(DNSKEYRecordContent::make(rr.getZoneRepresentation()))); + } + + if(keys.empty()) { + cerr << "No keys for zone '"<