]> granicus.if.org Git - pdns/commitdiff
Make sure that if you deactivate all keys, we'll still show the keys with 'show-zone...
authorBert Hubert <bert.hubert@netherlabs.nl>
Sat, 6 Oct 2012 10:42:46 +0000 (10:42 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Sat, 6 Oct 2012 10:42:46 +0000 (10:42 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@2769 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/pdnssec.cc

index 4413d461a29583d01573a804643e14c63b19fb75..96947a2626d482886cf0e97ea65bd97e88b83501 100644 (file)
@@ -467,26 +467,26 @@ void disableDNSSECOnZone(DNSSECKeeper& dk, const string& zone)
 void showZone(DNSSECKeeper& dk, const std::string& zone)
 {
   if(!dk.isSecuredZone(zone)) {
-    cerr<<"Zone is not secured\n";
-    return;
+    cerr<<"Zone is not actively secured\n";
   }
   NSEC3PARAMRecordContent ns3pr;
   bool narrow;
   bool haveNSEC3=dk.getNSEC3PARAM(zone, &ns3pr, &narrow);
   
-  if(!haveNSEC3) 
-    cout<<"Zone has NSEC semantics"<<endl;
-  else
-    cout<<"Zone has " << (narrow ? "NARROW " : "") <<"hashed NSEC3 semantics, configuration: "<<ns3pr.getZoneRepresentation()<<endl;
+  DNSSECKeeper::keyset_t keyset=dk.getKeys(zone);
   
-  cout <<"Zone is " << (dk.isPresigned(zone) ? "" : "not ") << "presigned\n";
   
-  DNSSECKeeper::keyset_t keyset=dk.getKeys(zone);
+  cout <<"Zone is " << (dk.isPresigned(zone) ? "" : "not ") << "presigned\n";
 
   if(keyset.empty())  {
     cerr << "No keys for zone '"<<zone<<"'."<<endl;
   }
   else {  
+    if(!haveNSEC3) 
+      cout<<"Zone has NSEC semantics"<<endl;
+    else
+      cout<<"Zone has " << (narrow ? "NARROW " : "") <<"hashed NSEC3 semantics, configuration: "<<ns3pr.getZoneRepresentation()<<endl;
+  
     cout << "keys: "<<endl;
     BOOST_FOREACH(DNSSECKeeper::keyset_t::value_type value, keyset) {
       cout<<"ID = "<<value.second.id<<" ("<<(value.second.keyOrZone ? "KSK" : "ZSK")<<"), tag = "<<value.first.getDNSKEY().getTag();