]> granicus.if.org Git - pdns/commitdiff
remove debugging to catch request for unsupported DNSCryptoKeyEngine, plus improve...
authorBert Hubert <bert.hubert@netherlabs.nl>
Mon, 7 Feb 2011 10:26:08 +0000 (10:26 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Mon, 7 Feb 2011 10:26:08 +0000 (10:26 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1990 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/dnssecinfra.cc

index 83c782899691bc67eef5df6092fbdb97d135d290..43edd9b836ed6c317cae103ab210f65eb6248872 100644 (file)
@@ -80,7 +80,6 @@ DNSCryptoKeyEngine* DNSCryptoKeyEngine::make(unsigned int algo)
   if(iter != makers.end())
     return (iter->second)(algo);
   else {
-    abort();
     throw runtime_error("Request to create key object for unknown algorithm number "+lexical_cast<string>(algo));
   }
 }
@@ -233,6 +232,8 @@ DSRecordContent makeDSFromDNSKey(const std::string& qname, const DNSKEYRecordCon
     shared_ptr<DNSCryptoKeyEngine> dpk(DNSCryptoKeyEngine::make(14)); // gives us ECDSAP384
     dsrc.d_digest = dpk->hash(toHash);
   }
+  else 
+    throw std::runtime_error("Asked to a DS of unkown digest type " + lexical_cast<string>(digest)+"\n");
   
   dsrc.d_algorithm= drc.d_algorithm;
   dsrc.d_digesttype=digest;