diff options
author | Razvan Becheriu <razvan@isc.org> | 2023-06-08 15:33:19 +0200 |
---|---|---|
committer | Razvan Becheriu <razvan@isc.org> | 2023-06-21 14:06:06 +0200 |
commit | 5f6b8592edb16eb755c6c0f172224ecad836b577 (patch) | |
tree | 2e978f1a01bc5d051413739a2130cf28be5f0ca6 /src/lib/dns/tests/tsig_unittest.cc | |
parent | [#2900] Added changelog for #2900 (diff) | |
download | kea-5f6b8592edb16eb755c6c0f172224ecad836b577.tar.xz kea-5f6b8592edb16eb755c6c0f172224ecad836b577.zip |
[#2830] use uint128_t for random prefix allocation
Diffstat (limited to 'src/lib/dns/tests/tsig_unittest.cc')
-rw-r--r-- | src/lib/dns/tests/tsig_unittest.cc | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/lib/dns/tests/tsig_unittest.cc b/src/lib/dns/tests/tsig_unittest.cc index 85b75532c9..e1a537c328 100644 --- a/src/lib/dns/tests/tsig_unittest.cc +++ b/src/lib/dns/tests/tsig_unittest.cc @@ -42,6 +42,7 @@ using namespace isc::dns; using namespace isc::util; using namespace isc::util::encode; using namespace isc::dns::rdata; +using namespace isc::dns::rdata::any; using isc::UnitTestUtil; using isc::util::unittests::matchWireData; @@ -88,10 +89,8 @@ protected: badkey_name("badkey.example.com"), test_class(RRClass::IN()), test_ttl(86400), message(Message::RENDER), dummy_data(1024, 0xdd), // should be sufficiently large for all tests - dummy_record(badkey_name, any::TSIG(TSIGKey::HMACMD5_NAME(), - 0x4da8877a, - TSIGContext::DEFAULT_FUDGE, - 0, NULL, qid, 0, 0, NULL)) + dummy_record(badkey_name, TSIG(TSIGKey::HMACMD5_NAME(), 0x4da8877a, + TSIGContext::DEFAULT_FUDGE, 0, NULL, qid, 0, 0, NULL)) { // Make sure we use the system time by default so that we won't be // confused due to other tests that tweak the time. @@ -217,7 +216,7 @@ commonSignChecks(ConstTSIGRecordPtr tsig, uint16_t expected_qid, const Name& expected_algorithm = TSIGKey::HMACMD5_NAME()) { ASSERT_TRUE(tsig != NULL); - const any::TSIG& tsig_rdata = tsig->getRdata(); + const TSIG& tsig_rdata = tsig->getRdata(); EXPECT_EQ(expected_algorithm, tsig_rdata.getAlgorithm()); EXPECT_EQ(expected_timesigned, tsig_rdata.getTimeSigned()); @@ -357,7 +356,7 @@ TEST_F(TSIGTest, signAtActualTime) { SCOPED_TRACE("Sign test for query at actual time"); ConstTSIGRecordPtr tsig = createMessageAndSign(qid, test_name, tsig_ctx.get()); - const any::TSIG& tsig_rdata = tsig->getRdata(); + const TSIG& tsig_rdata = tsig->getRdata(); // Check the resulted time signed is in the range of [now, now + 5] // (5 is an arbitrary choice). Note that due to the order of the call @@ -790,11 +789,10 @@ TEST_F(TSIGTest, badkeyForResponse) { } // A similar case with a different algorithm - const TSIGRecord dummy_record2(test_name, - any::TSIG(TSIGKey::HMACSHA1_NAME(), - 0x4da8877a, - TSIGContext::DEFAULT_FUDGE, - 0, NULL, qid, 0, 0, NULL)); + const TSIGRecord dummy_record2(test_name, TSIG(TSIGKey::HMACSHA1_NAME(), + 0x4da8877a, + TSIGContext::DEFAULT_FUDGE, + 0, NULL, qid, 0, 0, NULL)); { SCOPED_TRACE("Verify a response resulting in BADKEY due to bad alg"); commonVerifyChecks(*tsig_ctx, &dummy_record2, &dummy_data[0], |