13 #include <boost/noncopyable.hpp>
14 #include <boost/shared_ptr.hpp>
264 const size_t data_len);
354 const size_t data_len);
428 void update(
const void*
const data,
size_t len);
431 struct TSIGContextImpl;
432 TSIGContextImpl* impl_;
The Name class encapsulates DNS names.
TSIGContextError(const char *file, size_t line, const char *what)
ConstTSIGRecordPtr sign(const uint16_t qid, const void *const data, const size_t data_len)
Sign a DNS message.
State getState() const
Return the current state of the context.
TSIGError getError() const
Return the TSIG error as a result of the latest verification.
static const uint16_t DEFAULT_FUDGE
The recommended fudge value (in seconds) by RFC2845.
Server sent a signed response.
State
Internal state of context.
Server received a signed request.
Client sent a signed request, waiting response.
~TSIGContext()
The destructor.
boost::shared_ptr< TSIGKey > TSIGKeyPtr
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
Client successfully verified a response.
An exception that is thrown for logic errors identified in TSIG sign/verify operations.
boost::shared_ptr< const TSIGRecord > ConstTSIGRecordPtr
A pointer-like type pointing to an immutable TSIGRecord object.
This is a base class for exceptions thrown from the DNS library module.
Defines the logger used by the top-level component of kea-dhcp-ddns.
size_t getTSIGLength() const
Return the expected length of TSIG RR after sign()
void update(const void *const data, size_t len)
Update internal HMAC state by more data.
A simple repository of a set of TSIGKey objects.
boost::shared_ptr< TSIGContext > TSIGContextPtr
TSIGError verify(const TSIGRecord *const record, const void *const data, const size_t data_len)
Verify a DNS message.
bool lastHadSignature() const
Check whether the last verified message was signed.
TSIGContext(const TSIGKey &key)
Constructor from a TSIG key.