/// @brief Adds instance of the attribute to the collection.
///
/// @param attr Pointer to the attribute being added (can be null).
- /// @param back Insert bsk (vs front).
+ /// @param back Insert back (vs front).
void add(const ConstAttributePtr& attr, bool back = true);
/// @brief Deletes an attribute from the collection.
if ((ptr < AUTH_HDR_LEN) || (ptr > buffer_.size() - 2 - AUTH_VECTOR_LEN) ||
(buffer_[ptr + 1] != 2 + AUTH_VECTOR_LEN) ||
(auth_.size() != AUTH_VECTOR_LEN)) {
- isc_throw(BadValue, "can't verify Message-Authenticator");
+ isc_throw(BadValue, "Can't verify Message-Authenticator");
}
vector<uint8_t> sign;
CryptoLink::getCryptoLink().createHMAC(&secret_[0], secret_.size(), MD5));
// Build to_verify buffer.
- size_t length = buffer_.size();
std::vector<uint8_t> to_verify = buffer_;
memmove(&to_verify[4], &auth_[0], auth_.size());
memset(&to_verify[ptr + 2], 0, AUTH_VECTOR_LEN);
MessagePtr message(new Message(buffer, auth, "foo"));
ASSERT_TRUE(message);
EXPECT_THROW_MSG(message->decode(), BadValue,
- "can't verify Message-Authenticator");
+ "Can't verify Message-Authenticator");
}
{
SCOPED_TRACE("too long Message-Authenticator");
MessagePtr message(new Message(buffer, auth, "foo"));
ASSERT_TRUE(message);
EXPECT_THROW_MSG(message->decode(), BadValue,
- "can't verify Message-Authenticator");
+ "Can't verify Message-Authenticator");
}
{
SCOPED_TRACE("bad Message-Authenticator");
request, response,
true, TestCompleteCheck,
[this](const boost::system::error_code& ec,
- const WireDataPtr& response,
+ const WireDataPtr& resp,
const std::string& parsing_error) {
io_service_->stop();
// There should be no IO error (answer from the server is received).
ADD_FAILURE() << "asyncSendRequest failed: " << ec.message();
}
// The response object is null.
- EXPECT_FALSE(response);
+ EXPECT_FALSE(resp);
// The message parsing error should be returned.
EXPECT_FALSE(parsing_error.empty());
}));
request1, response1,
true, TestCompleteCheck,
[this, &cb_num](const boost::system::error_code& ec,
- const WireDataPtr& response,
+ const WireDataPtr& resp,
const std::string&) {
if (++cb_num > 1) {
io_service_->stop();
// error code.
EXPECT_TRUE(ec.value() == boost::asio::error::timed_out);
// There should be no response returned.
- EXPECT_FALSE(response);
+ EXPECT_FALSE(resp);
},
TcpClient::RequestTimeout(100),
TcpClient::ConnectHandler(),
request, response,
true, TestCompleteCheck,
[this, &cb_num](const boost::system::error_code& ec,
- const WireDataPtr& response,
+ const WireDataPtr& resp,
const std::string&) {
if (++cb_num > 1) {
io_service_->stop();
// error code.
EXPECT_TRUE(ec.value() == boost::asio::error::timed_out);
// There should be no response returned.
- EXPECT_FALSE(response);
+ EXPECT_FALSE(resp);
},
TcpClient::RequestTimeout(100),