Auth: Don't warn on empty default-{k,z}sk-algorithm
authorPieter Lexis <pieter.lexis@powerdns.com>
Mon, 16 Oct 2017 11:20:12 +0000 (13:20 +0200)
committerPieter Lexis <pieter.lexis@powerdns.com>
Mon, 16 Oct 2017 11:24:27 +0000 (13:24 +0200)
Closes #5809

pdns/common_startup.cc

index 28867457fb6cc82b0fc59e4a55514b7799a45ea1..3bdc364f8449ad31e0506416b07f0640103e8367 100644 (file)
@@ -528,6 +528,8 @@ void mainthread()
   // Some sanity checking on default key settings
   for (const string& algotype : {"ksk", "zsk"}) {
     int algo, size;
+    if (::arg()["default-"+algotype+"-algorithm"].empty())
+      continue;
     algo = DNSSECKeeper::shorthand2algorithm(::arg()["default-"+algotype+"-algorithm"]);
     size = ::arg().asNum("default-"+algotype+"-size");
     if (algo == -1)