]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
turns out that for each signature, we consulted the database because we ignored the...
authorBert Hubert <bert.hubert@netherlabs.nl>
Sat, 5 Feb 2011 17:40:50 +0000 (17:40 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Sat, 5 Feb 2011 17:40:50 +0000 (17:40 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1975 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/dbdnsseckeeper.cc

index f4519781e660c13ace37980e058685a4f8290341..f9515872bac7d63f9da81a0706c842422099fe71 100644 (file)
@@ -32,7 +32,7 @@
 
 
 using namespace boost::assign;
-using namespace std;
+#include "namespaces.hh"
 using namespace boost;
 
 __thread DNSSECKeeper::keycache_t* DNSSECKeeper::t_keycache;
@@ -43,8 +43,7 @@ bool DNSSECKeeper::isSecuredZone(const std::string& zone)
 {
   if(isPresigned(zone))
     return true;
-       
-  
+         
   keycache_t::const_iterator iter = t_keycache->find(zone);
   if(iter != t_keycache->end() && iter->d_ttd > (unsigned int)time(0)) { 
     if(iter->d_keys.empty())
@@ -67,11 +66,9 @@ bool DNSSECKeeper::isSecuredZone(const std::string& zone)
 
 bool DNSSECKeeper::isPresigned(const std::string& name)
 {
-  vector<string> meta;
-  d_keymetadb.getDomainMetadata(name, "PRESIGNED", meta);
-  if(meta.empty())
-    return false;
-  return meta[0]=="1";
+  string meta;
+  getFromMeta(name, "PRESIGNED", meta);
+  return meta=="1";
 }
 
 void DNSSECKeeper::addKey(const std::string& name, bool keyOrZone, int algorithm, int bits, bool active)