![]() |
Kea 3.1.1
|
GSS-TSIG extension of the D2 TSIG key class. More...
#include <gss_tsig_key.h>
Public Member Functions | |
GssTsigKey (const std::string &key_name, const std::vector< uint8_t > &import) | |
Constructor. | |
GssTsigKey (const std::string &key_name, gss_ctx_id_t sec_ctx=GSS_C_NO_CONTEXT) | |
Constructor. | |
virtual | ~GssTsigKey () |
Destructor. | |
std::chrono::system_clock::time_point | getExpire () const |
Get the key expire. | |
uint32_t | getExpire32 () const |
Get the key expire (32 bits). | |
std::chrono::system_clock::time_point | getInception () const |
Get the key inception. | |
uint32_t | getInception32 () const |
Get the key inception (32 bits). | |
GssApiSecCtx & | getSecCtx () |
Get the security context. | |
void | setExpire (const std::chrono::system_clock::time_point &expire) |
Set the key expire. | |
void | setInception (const std::chrono::system_clock::time_point &inception) |
Set the key inception. | |
![]() | |
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. | |
![]() | |
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 Name & | getAlgorithmName () const |
Return the algorithm name. | |
size_t | getDigestbits () const |
Return the minimum truncated length. | |
const Name & | getKeyName () 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. | |
TSIGKey & | operator= (const TSIGKey &source) |
Assignment operator. | |
std::string | toText () const |
Converts the TSIGKey to a string value. | |
Protected Attributes | |
std::chrono::system_clock::time_point | expire_ |
The key expire date. | |
std::chrono::system_clock::time_point | inception_ |
The key inception date. | |
std::unique_ptr< GssApiSecCtx > | sec_ctx_ |
GSS-API security context. | |
Additional Inherited Members | |
![]() | |
static const Name & | GSSTSIG_NAME () |
static const Name & | HMACMD5_NAME () |
Well known algorithm names as defined in RFC2845 and RFC4635. | |
static const Name & | HMACMD5_SHORT_NAME () |
static const Name & | HMACSHA1_NAME () |
static const Name & | HMACSHA224_NAME () |
static const Name & | HMACSHA256_NAME () |
static const Name & | HMACSHA384_NAME () |
static const Name & | HMACSHA512_NAME () |
GSS-TSIG extension of the D2 TSIG key class.
Implements a isc::d2::D2TsigKey
derived class which can be used as the value of D2TsigKeyPtr so with minimal or no update to the DNS++ library. The class adds to the D2TsigKey base a GSS-API security context maintaining 1::1 binding the key and it including for the lifetime: e.g. to get a fresh GSS-API security context a fresh object must be created.
Definition at line 26 of file gss_tsig_key.h.
isc::gss_tsig::GssTsigKey::GssTsigKey | ( | const std::string & | key_name, |
gss_ctx_id_t | sec_ctx = GSS_C_NO_CONTEXT ) |
Constructor.
key_name | Domain name of the key. |
sec_ctx | Security context (can be 0). |
Definition at line 18 of file gss_tsig_key.cc.
References isc::d2::D2TsigKey::D2TsigKey(), and sec_ctx_.
Referenced by isc::gss_tsig::ManagedKey::ManagedKey().
isc::gss_tsig::GssTsigKey::GssTsigKey | ( | const std::string & | key_name, |
const std::vector< uint8_t > & | import ) |
Constructor.
Use the gss_import_sec_context GSS-API function. This constructor is expected to be used for restoring / importing a security context saved on disk.
key_name | Domain name of the key. |
import | Vector of byte representing the GSS-API security context. |
Definition at line 22 of file gss_tsig_key.cc.
References isc::d2::D2TsigKey::D2TsigKey(), and sec_ctx_.
|
virtual |
Destructor.
Definition at line 26 of file gss_tsig_key.cc.
|
inline |
Get the key expire.
Definition at line 84 of file gss_tsig_key.h.
References expire_.
|
inline |
Get the key expire (32 bits).
Definition at line 91 of file gss_tsig_key.h.
References expire_.
|
inline |
Get the key inception.
Definition at line 62 of file gss_tsig_key.h.
References inception_.
|
inline |
Get the key inception (32 bits).
Definition at line 69 of file gss_tsig_key.h.
References inception_.
|
inline |
Get the security context.
Definition at line 55 of file gss_tsig_key.h.
References sec_ctx_.
|
inline |
Set the key expire.
expire | The new key expire date. |
Definition at line 99 of file gss_tsig_key.h.
References expire_.
|
inline |
Set the key inception.
inception | The new key inception date. |
Definition at line 77 of file gss_tsig_key.h.
References inception_.
|
protected |
The key expire date.
Definition at line 111 of file gss_tsig_key.h.
Referenced by getExpire(), getExpire32(), setExpire(), and isc::gss_tsig::ManagedKey::toElement().
|
protected |
The key inception date.
Definition at line 108 of file gss_tsig_key.h.
Referenced by getInception(), getInception32(), setInception(), and isc::gss_tsig::ManagedKey::toElement().
|
protected |
GSS-API security context.
Definition at line 105 of file gss_tsig_key.h.
Referenced by GssTsigKey(), GssTsigKey(), getSecCtx(), and isc::gss_tsig::ManagedKey::toElement().