]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Make export-zone-ds output similar to export-zone-dnskey
authorPieter Lexis <pieter.lexis@powerdns.com>
Mon, 5 Dec 2016 13:53:06 +0000 (13:53 +0000)
committerPieter Lexis <pieter.lexis@powerdns.com>
Mon, 5 Dec 2016 13:53:06 +0000 (13:53 +0000)
pdns/pdnsutil.cc

index 794dfcf2935b2f4cf89e13ada475ddc48578bdeb..092fd81e9d17004a32226b7db7b8bc4d008e157b 100644 (file)
@@ -1664,7 +1664,7 @@ bool showZone(DNSSECKeeper& dk, const DNSName& zone, bool exportDS = false)
       if (shown) continue;
       shown=true;
 
-      const std::string prefix(exportDS ? "DS = " : "");
+      const std::string prefix(exportDS ? "" : "DS = ");
       cout<<prefix<<zone.toString()<<" IN DS "<<makeDSFromDNSKey(zone, key, 1).getZoneRepresentation() << " ; ( SHA1 digest )" << endl;
       cout<<prefix<<zone.toString()<<" IN DS "<<makeDSFromDNSKey(zone, key, 2).getZoneRepresentation() << " ; ( SHA256 digest )" << endl;
       try {
@@ -1713,7 +1713,7 @@ bool showZone(DNSSECKeeper& dk, const DNSName& zone, bool exportDS = false)
       }
       if (value.second.keyType == DNSSECKeeper::KSK || value.second.keyType == DNSSECKeeper::CSK) {
         const auto &key = value.first.getDNSKEY();
-        const std::string prefix(exportDS ? "DS = " : "");
+        const std::string prefix(exportDS ? "" : "DS = ");
         cout<<prefix<<zone.toString()<<" IN DS "<<makeDSFromDNSKey(zone, key, 1).getZoneRepresentation() << " ; ( SHA1 digest )" << endl;
         cout<<prefix<<zone.toString()<<" IN DS "<<makeDSFromDNSKey(zone, key, 2).getZoneRepresentation() << " ; ( SHA256 digest )" << endl;
         try {