algorithm_(algorithm), inception_(inception), expire_(expire),
mode_(mode), error_(error), key_(key), other_data_(other_data)
{}
+
TKEYImpl(const Name& algorithm, uint32_t inception, uint32_t expire,
uint16_t mode, uint16_t error, size_t key_len,
const void* key, size_t other_len, const void* other_data) :
other_data_(static_cast<const uint8_t*>(other_data),
static_cast<const uint8_t*>(other_data) + other_len)
{}
+
template <typename Output>
void toWireCommon(Output& output) const;
const uint32_t expire =
timeFromText32(lexer.getNextToken(MasterToken::STRING).getString());
+ /// The mode is either a mnemonic (only one is defined: GSS-API) or
+ /// a number.
const string& mode_txt =
lexer.getNextToken(MasterToken::STRING).getString();
uint32_t mode = 0;
mode = boost::lexical_cast<uint32_t>(mode_txt);
} catch (const boost::bad_lexical_cast&) {
isc_throw(InvalidRdataText, "Invalid TKEY Mode");
- }
+ }
if (mode > 0xffff) {
isc_throw(InvalidRdataText, "TKEY Mode out of range");
}
/// fully qualified.
///
/// The Mode field is an unsigned 16-bit decimal integer or a valid mnemonic
-/// as specified in RFC2920. Currently only "GSS-API" (case sensitive) is
+/// as specified in RFC2930. Currently only "GSS-API" (case sensitive) is
/// supported ("Diffie-Hellman" is not).
/// The Error field is an unsigned 16-bit decimal integer or a valid mnemonic
MasterLexer lexer;
lexer.pushSource(ss);
- impl_ptr.reset(constructFromLexer(lexer, NULL));
+ impl_ptr.reset(constructFromLexer(lexer, 0));
if (lexer.getNextToken().getType() != MasterToken::END_OF_FILE) {
isc_throw(InvalidRdataText,
/// must check consistency between the length parameter and the actual
/// RDATA length.
TKEY::TKEY(InputBuffer& buffer, size_t) :
- impl_(NULL)
+ impl_(0)
{
Name algorithm(buffer);
if (!impl_->other_data_.empty()) {
return (&impl_->other_data_[0]);
} else {
- return (NULL);
+ return (0);
}
}
/// The parameters are a straightforward mapping of %TKEY RDATA
/// fields as defined %in RFC2930.
///
- /// This RR is pretty close to the TSIG one with 32 bit timestamps.
+ /// This RR is pretty close to the TSIG RR with 32 bit timestamps,
+ /// or the RRSIG RR with a second "other" data field.
///
/// This constructor internally involves resource allocation, and if
/// it fails, a corresponding standard exception will be thrown.