]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
pdnsutil: add published to list-keys
authorChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Mon, 9 Nov 2020 18:43:36 +0000 (19:43 +0100)
committerChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Mon, 9 Nov 2020 18:43:36 +0000 (19:43 +0100)
pdns/pdnsutil.cc

index af34a87645b7a5b3aa13fcee90d41470557da83f..97acfa0638201701587b829cd27e14b13ab1bebb 100644 (file)
@@ -808,8 +808,8 @@ static int deleteZone(const DNSName &zone) {
 
 static void listKey(DomainInfo const &di, DNSSECKeeper& dk, bool printHeader = true) {
   if (printHeader) {
-    cout<<"Zone                          Type Act Size    Algorithm       ID   Location    Keytag"<<endl;
-    cout<<"--------------------------------------------------------------------------------------"<<endl;
+    cout<<"Zone                          Type Act Pub Size    Algorithm       ID   Location    Keytag"<<endl;
+    cout<<"------------------------------------------------------------------------------------------"<<endl;
   }
   unsigned int spacelen = 0;
   for (auto const &key : dk.getKeys(di.zone)) {
@@ -819,13 +819,20 @@ static void listKey(DomainInfo const &di, DNSSECKeeper& dk, bool printHeader = t
     else
       cout<<string(30 - di.zone.toStringNoDot().length(), ' ');
 
-    cout<<DNSSECKeeper::keyTypeToString(key.second.keyType)<<" ";
+    cout<<DNSSECKeeper::keyTypeToString(key.second.keyType)<<"  ";
+
     if (key.second.active) {
       cout << "Act ";
     } else {
       cout << "    ";
     }
 
+    if (key.second.published) {
+      cout << "Pub ";
+    } else {
+      cout << "    ";
+    }
+
     spacelen = (std::to_string(key.first.getKey()->getBits()).length() >= 8) ? 1 : 8 - std::to_string(key.first.getKey()->getBits()).length();
     if (key.first.getKey()->getBits() < 1) {
       cout<<"invalid "<<endl;