Kea 2.7.6
isc::d2::D2TsigKey Class Reference

Statistics keeping extension of the DNS TSIGKey class. More...

#include <d2_tsig_key.h>

+ Inheritance diagram for isc::d2::D2TsigKey:

Public Member Functions

 D2TsigKey (const dns::Name &key_name, const dns::Name &algorithm_name, const void *secret, size_t secret_len, size_t digestbits=0)
 Constructor.
 
 D2TsigKey (const std::string &key_spec)
 Constructor.
 
virtual ~D2TsigKey ()
 Destructor.
 
virtual dns::TSIGContextPtr createContext ()
 Create TSIG context.
 
virtual void resetStats ()
 Reset statistics.
 
- Public Member Functions inherited from isc::dns::TSIGKey
 TSIGKey (const Name &key_name, const Name &algorithm_name, const void *secret, size_t secret_len, size_t digestbits=0)
 Constructors, Assignment Operator and Destructor.
 
 TSIGKey (const std::string &str)
 Constructor from an input string.
 
 TSIGKey (const TSIGKey &source)
 The copy constructor.
 
virtual ~TSIGKey ()
 The destructor.
 
isc::cryptolink::HashAlgorithm getAlgorithm () const
 Return the hash algorithm name in the form of cryptolink::HashAlgorithm.
 
const NamegetAlgorithmName () const
 Return the algorithm name.
 
size_t getDigestbits () const
 Return the minimum truncated length.
 
const NamegetKeyName () const
 Getter Methods.
 
const void * getSecret () const
 Return the value of the TSIG secret.
 
size_t getSecretLength () const
 Return the length of the TSIG secret in bytes.
 
TSIGKeyoperator= (const TSIGKey &source)
 Assignment operator.
 
std::string toText () const
 Converts the TSIGKey to a string value.
 

Additional Inherited Members

- Static Public Member Functions inherited from isc::dns::TSIGKey
static const NameGSSTSIG_NAME ()
 
static const NameHMACMD5_NAME ()
 Well known algorithm names as defined in RFC2845 and RFC4635.
 
static const NameHMACMD5_SHORT_NAME ()
 
static const NameHMACSHA1_NAME ()
 
static const NameHMACSHA224_NAME ()
 
static const NameHMACSHA256_NAME ()
 
static const NameHMACSHA384_NAME ()
 
static const NameHMACSHA512_NAME ()
 

Detailed Description

Statistics keeping extension of the DNS TSIGKey class.

Implements a TSIGKey derived class which can be used as the value of TSIGKeyPtr so with minimal or no update to the DNS++ library.

Definition at line 21 of file d2_tsig_key.h.

Constructor & Destructor Documentation

◆ D2TsigKey() [1/2]

isc::d2::D2TsigKey::D2TsigKey ( const std::string & key_spec)
explicit

Constructor.

Initialize the key statistics.

Parameters
key_specSpecification of the key (name:secret[:algorithm][:digestbits])

Definition at line 22 of file d2_tsig_key.cc.

◆ D2TsigKey() [2/2]

isc::d2::D2TsigKey::D2TsigKey ( const dns::Name & key_name,
const dns::Name & algorithm_name,
const void * secret,
size_t secret_len,
size_t digestbits = 0 )

Constructor.

Initialize the key statistics.

Parameters
key_nameThe name of the key as a domain name.
algorithm_nameThe hash algorithm used for this key in the form of domain name.
secretPoint to a binary sequence of the shared secret to be used for this key.
secret_lenThe size of the binary data (secret) in bytes.
digestbitsThe number of bits to include in the digest (0 means to include all)

Definition at line 26 of file d2_tsig_key.cc.

◆ ~D2TsigKey()

isc::d2::D2TsigKey::~D2TsigKey ( )
virtual

Destructor.

Remove the key statistics.

Definition at line 32 of file d2_tsig_key.cc.

Member Function Documentation

◆ createContext()

TSIGContextPtr isc::d2::D2TsigKey::createContext ( )
virtual

Create TSIG context.

Note
Derived classes can implement their own specific context.
Returns
The specific dns::TSIGContext of the dns::TSIGKey.

Definition at line 67 of file d2_tsig_key.cc.

◆ resetStats()

void isc::d2::D2TsigKey::resetStats ( )
virtual

Reset statistics.

Definition at line 57 of file d2_tsig_key.cc.

References isc::stats::StatsMgr::generateName(), isc::dns::TSIGKey::getKeyName(), isc::stats::StatsMgr::instance(), isc::d2::D2Stats::key, isc::stats::StatsMgr::reset(), and isc::dns::Name::toText().

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: