]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
pdnsutil: show active flag in list-keys
authorChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Mon, 9 Nov 2020 18:24:11 +0000 (19:24 +0100)
committerChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Mon, 9 Nov 2020 18:24:11 +0000 (19:24 +0100)
pdns/pdnsutil.cc

index 55ae03a17b9d52de48b1fd5ee889113704b14047..3e002afcd3abc0a4cc8afc03e5cb800e02c2aced 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    Size    Algorithm       ID   Location    Keytag"<<endl;
-    cout<<"-------------------------------------------------------------------------------------"<<endl;
+    cout<<"Zone                          Type Act Size    Algorithm       ID   Location    Keytag"<<endl;
+    cout<<"--------------------------------------------------------------------------------------"<<endl;
   }
   unsigned int spacelen = 0;
   for (auto const &key : dk.getKeys(di.zone)) {
@@ -819,7 +819,12 @@ 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 << "    ";
+    }
 
     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) {