From efc105914b97582815c0beaffd17282b2cb2d619 Mon Sep 17 00:00:00 2001 From: Pieter Lexis Date: Mon, 14 Jan 2019 17:42:56 +0100 Subject: [PATCH] Use algo nums to compare default-*-algorithm --- pdns/common_startup.cc | 58 ++++++++++++++++++++++++------------------ 1 file changed, 33 insertions(+), 25 deletions(-) diff --git a/pdns/common_startup.cc b/pdns/common_startup.cc index 1dd7c0956..eed0cbb0e 100644 --- a/pdns/common_startup.cc +++ b/pdns/common_startup.cc @@ -557,33 +557,41 @@ void mainthread() } catch(...) {} - // Some sanity checking on default key settings - bool hadKeyError = false; - 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) { - g_log<