From: Otto Date: Wed, 3 Nov 2021 14:57:03 +0000 (+0100) Subject: Return the proper ede on validation failure; fixes #10936 X-Git-Tag: dnsdist-1.7.0-beta1~3^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eea5263bc25869206862d1a7a5801620a36bcb5a;p=thirdparty%2Fpdns.git Return the proper ede on validation failure; fixes #10936 --- diff --git a/pdns/validate.cc b/pdns/validate.cc index 3a88ebefef..12df3afc43 100644 --- a/pdns/validate.cc +++ b/pdns/validate.cc @@ -920,7 +920,7 @@ bool isRRSIGIncepted(const time_t now, const shared_ptr& sig return sig->d_siginception - g_signatureInceptionSkew <= now; } -static bool checkSignatureWithKey(time_t now, const shared_ptr sig, const shared_ptr key, const std::string& msg) +static bool checkSignatureWithKey(time_t now, const shared_ptr sig, const shared_ptr key, const std::string& msg, vState& ede) { bool result = false; try { @@ -932,13 +932,18 @@ static bool checkSignatureWithKey(time_t now, const shared_ptrd_algorithm, key->d_key); result = dke->verify(msg, sig->d_signature); LOG("signature by key with tag "<d_tag<<" and algorithm "<d_algorithm)<<" was " << (result ? "" : "NOT ")<<"valid"<d_siginception - g_signatureInceptionSkew > now) ? "not yet valid" : "expired")<<" (inception: "<d_siginception<<", inception skew: "<d_sigexpire<<", now: "<d_siginception - g_signatureInceptionSkew > now) ? vState::BogusSignatureNotYetValid : vState::BogusSignatureExpired; + LOG("Signature is "<<(ede == vState::BogusSignatureNotYetValid ? "not yet valid" : "expired")<<" (inception: "<d_siginception<<", inception skew: "<d_sigexpire<<", now: "<