Permalink
Browse files

Show if key is missing

This is deduced from having getBits() return value smaller than 1
  • Loading branch information...
1 parent c011a01 commit 25109e25f74315a9af306ae771f71e6582cb255d @cmouse cmouse committed with cmouse Mar 29, 2015
Showing with 4 additions and 0 deletions.
  1. +4 −0 pdns/pdnssec.cc
View
@@ -921,6 +921,10 @@ bool showZone(DNSSECKeeper& dk, const std::string& zone)
BOOST_FOREACH(DNSSECKeeper::keyset_t::value_type value, keyset) {
string algname;
algorithm2name(value.first.d_algorithm, algname);
+ if (value.first.getKey()->getBits() < 1) {
+ cout<<"ID = "<<value.second.id<<" ("<<(value.second.keyOrZone ? "KSK" : "ZSK")<<") <key missing or defunct>" <<endl;
+ continue;
+ }
cout<<"ID = "<<value.second.id<<" ("<<(value.second.keyOrZone ? "KSK" : "ZSK")<<"), tag = "<<value.first.getDNSKEY().getTag();
cout<<", algo = "<<(int)value.first.d_algorithm<<", bits = "<<value.first.getKey()->getBits()<<"\tActive: "<<value.second.active<< " ( " + algname + " ) "<<endl;
if(value.second.keyOrZone || ::arg().mustDo("direct-dnskey") || g_verbose)

0 comments on commit 25109e2

Please sign in to comment.