Show
Ignore:
Timestamp:
02/07/11 10:31:12 (2 years ago)
Author:
ahu
Message:

make sure that addKey lets us know if it worked, allowing us to spot non-working configurations
unthread the keycache, reintroducing the 'shared key' problem, but plugging a massive memory leak

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/pdns/pdns/dnsseckeeper.hh

    r1969 r1982  
    3333  DNSSECKeeper() : d_keymetadb("key-only") 
    3434  { 
    35     if(!t_keycache) 
    36       t_keycache = new keycache_t(); 
    3735  } 
    3836  bool isSecuredZone(const std::string& zone); 
     
    4038  keyset_t getKeys(const std::string& zone, boost::tribool allOrKeyOrZone = boost::indeterminate); 
    4139  DNSSECPrivateKey getKeyById(const std::string& zone, unsigned int id); 
    42   void addKey(const std::string& zname, bool keyOrZone, int algorithm=5, int bits=0, bool active=true); 
    43   void addKey(const std::string& zname, const DNSSECPrivateKey& dpk, bool active=true); 
     40  bool addKey(const std::string& zname, bool keyOrZone, int algorithm=5, int bits=0, bool active=true); 
     41  bool addKey(const std::string& zname, const DNSSECPrivateKey& dpk, bool active=true); 
    4442  void removeKey(const std::string& zname, unsigned int id); 
    4543  void activateKey(const std::string& zname, unsigned int id); 
    4644  void deactivateKey(const std::string& zname, unsigned int id); 
    4745 
    48   void secureZone(const std::string& fname, int algorithm); 
     46  bool secureZone(const std::string& fname, int algorithm); 
    4947 
    5048  bool getNSEC3PARAM(const std::string& zname, NSEC3PARAMRecordContent* n3p=0, bool* narrow=0); 
     
    107105  > metacache_t; 
    108106 
    109   static __thread keycache_t* t_keycache; 
     107  static keycache_t s_keycache; 
    110108  static metacache_t s_metacache; 
    111109  static pthread_mutex_t s_metacachelock; 
     110  static pthread_mutex_t s_keycachelock; 
    112111}; 
    113112