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