diff --git a/docs/settings.rst b/docs/settings.rst index 506b24845651..0181b2894913 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -572,6 +572,20 @@ Configure a delay to send out notifications, no delay by default. Read additional DNSKEY, CDS and CDNSKEY records from the records table/your BIND zonefile. If not set, DNSKEY, CDS and CDNSKEY records in the zonefiles are ignored. +.. _setting-direct-dnskey-signature: + +``direct-dnskey-signature`` +----------------- + +- Boolean +- Default: no + +.. versionadded:: 5.0.0 + +Read signatures of DNSKEY records directly from the backend. +If not set and the record is not presigned, DNSKEY records will be signed directly by PDNS Authoritative. +Please only use this if you are sure that you need it. + .. _setting-disable-axfr: ``disable-axfr`` diff --git a/pdns/auth-main.cc b/pdns/auth-main.cc index 691242143f2e..722ae7e86051 100644 --- a/pdns/auth-main.cc +++ b/pdns/auth-main.cc @@ -295,6 +295,7 @@ static void declareArguments() ::arg().setSwitch("traceback-handler", "Enable the traceback handler (Linux only)") = "yes"; ::arg().setSwitch("direct-dnskey", "Fetch DNSKEY, CDS and CDNSKEY RRs from backend during DNSKEY or CDS/CDNSKEY synthesis") = "no"; + ::arg().setSwitch("direct-dnskey-signature", "Fetch signature of DNSKEY RRs from backend directly") = "no"; ::arg().set("default-ksk-algorithm", "Default KSK algorithm") = "ecdsa256"; ::arg().set("default-ksk-size", "Default KSK size (0 means default)") = "0"; ::arg().set("default-zsk-algorithm", "Default ZSK algorithm") = ""; diff --git a/pdns/dnssecsigner.cc b/pdns/dnssecsigner.cc index 0e122c11a319..041a642a503b 100644 --- a/pdns/dnssecsigner.cc +++ b/pdns/dnssecsigner.cc @@ -151,7 +151,7 @@ static void addSignature(DNSSECKeeper& dk, UeberBackend& db, const DNSName& sign if(toSign.empty()) return; vector rrcs; - if(dk.isPresigned(signer)) { + if(dk.isPresigned(signer) || (::arg().mustDo("direct-dnskey-signature") && signQType == QType::DNSKEY)) { //cerr<<"Doing presignatures"<