30 return (
"not yet ready");
44 memmove(&n, &r[0],
sizeof(uint32_t));
46 s << n <<
"." << suffix;
59 lock_guard<mutex> lock(*
mutex_);
102 uint32_t lifetime =
sec_ctx_->getLifetime();
103 map->set(
"security-context-lifetime",
112 map->set(
"tkey-status",
static ElementPtr create(const Position &pos=ZERO_POSITION())
static ElementPtr createMap(const Position &pos=ZERO_POSITION())
Creates an empty MapElement type ElementPtr.
const Name & getKeyName() const
Getter Methods.
std::string toText() const
Converts the TSIGKey to a string value.
GSS-TSIG overwrite of the DNS TSIGContext class.
std::chrono::system_clock::time_point expire_
The key expire date.
GssTsigKey(const std::string &key_name, gss_ctx_id_t sec_ctx=GSS_C_NO_CONTEXT)
Constructor.
std::unique_ptr< GssApiSecCtx > sec_ctx_
GSS-API security context.
std::chrono::system_clock::time_point inception_
The key inception date.
std::string getKeyNameStr() const
Get the key name as a string.
static std::string genName(const std::string &server)
Create a random name from a suffix.
std::string getParentID() const
Get the DNS server (parent) ID.
virtual dns::TSIGContextPtr createContext()
Create GssTsigContext context.
isc::data::ElementPtr toElement() const
Unparse a key object.
boost::scoped_ptr< std::mutex > mutex_
Mutex for protecting key state.
void setTKeyStatus(TKeyExchange::Status tkey_status)
Set the TKEY exchange status.
TKeyExchangePtr & getTKeyExchange()
Get the TKEY exchange.
void setStatus(Status status)
Set the key status.
static std::string statusToText(Status status)
Convert a status to its textual form.
ManagedKey(const std::string &name)
Constructor.
void operator()(TKeyExchange::Status tkey_status)
The TKEY exchange completion handler.
@ EXPIRED
Expired (no longer usable).
@ NOT_READY
Not yet ready (not yet usable).
The TKeyExchange class handles communication with the DNS server.
Status
A status code of the TKeyExchange.
@ SUCCESS
Response received and is ok.
static std::string statusToText(Status status)
Convert a status to its textual form.
Implements a TSIGContext derived class which can be used as the value of TSIGContext pointers so with...
#define LOG_WARN(LOGGER, MESSAGE)
Macro to conveniently test warn output and log it.
#define LOG_DEBUG(LOGGER, LEVEL, MESSAGE)
Macro to conveniently test debug output and log it.
std::vector< uint8_t > random(size_t len)
Generate random value.
boost::shared_ptr< Element > ElementPtr
boost::shared_ptr< TSIGContext > TSIGContextPtr
const isc::log::MessageID GSS_TSIG_NEW_KEY_SETUP_FAILED
boost::shared_ptr< GssTsigContext > GssTsigContextPtr
Type of pointer to a GSS-TSIG context.
const isc::log::MessageID GSS_TSIG_NEW_KEY_SETUP_SUCCEED
isc::log::Logger gss_tsig_logger("gss-tsig-hooks")
const int DBGLVL_TRACE_BASIC
Trace basic operations.
std::string clockToText(std::chrono::system_clock::time_point t, size_t fsecs_precision)
Converts chrono time point structure to text.
Defines the logger used by the top-level component of kea-lfc.