From 5780cb460a5d221093b38254ff393449cabfae8d Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Tue, 13 Jun 2017 15:16:55 +0200 Subject: [PATCH] rec: Check that DNSKEYs have protocol set to 3 --- pdns/validate.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pdns/validate.cc b/pdns/validate.cc index 9790131dc5..5778c08ab3 100644 --- a/pdns/validate.cc +++ b/pdns/validate.cc @@ -21,7 +21,7 @@ static vector > getByTag(const skeyset_t& keys, { vector> ret; for(const auto& key : keys) - if(key->getTag() == tag && key->d_algorithm == algorithm) + if(key->d_protocol == 3 && key->getTag() == tag && key->d_algorithm == algorithm) ret.push_back(key); return ret; } @@ -253,7 +253,7 @@ static bool checkSignatureWithKey(time_t now, const shared_ptrd_siginception >= now) ? "not yet valid" : "expired")<<" (inception: "<d_siginception<<", expiration: "<d_sigexpire<<", now: "<d_signer))<<" -> "<