Switch to new KeyChain where possible
signed_interest::POS_RANDOM_VAL and signed_interest::POS_TIMESTAMP
constants are deprecated. Use command_interest:: equivalents instead.
This commit also includes fix for the backward compatibility regression
due to move of deprecated TPM/PublicInfo header files.
Change-Id: Ic3b008fc6758f3ac83f191158b6ac0789483f90d
Refs: #3098
diff --git a/tests/unit-tests/security/command-interest-validator.t.cpp b/tests/unit-tests/security/command-interest-validator.t.cpp
index 09ae2b9..cb01b36 100644
--- a/tests/unit-tests/security/command-interest-validator.t.cpp
+++ b/tests/unit-tests/security/command-interest-validator.t.cpp
@@ -35,7 +35,7 @@
using namespace ndn::tests;
-class CommandInterestValidatorFixture : public IdentityManagementTimeFixture
+class CommandInterestValidatorFixture : public IdentityManagementV1TimeFixture
{
protected:
CommandInterestValidatorFixture()
@@ -157,7 +157,7 @@
BOOST_AUTO_TEST_CASE(BadTimestamp)
{
auto i1 = makeCommandInterest();
- setNameComponent(*i1, signed_interest::POS_TIMESTAMP, "not-timestamp");
+ setNameComponent(*i1, command_interest::POS_TIMESTAMP, "not-timestamp");
assertReject(*i1, CommandInterestValidator::ErrorCode::BAD_TIMESTAMP);
}
@@ -251,8 +251,8 @@
assertAccept(*i1);
auto i2 = makeCommandInterest(); // signed at 0s
- setNameComponent(*i2, signed_interest::POS_TIMESTAMP,
- i1->getName()[signed_interest::POS_TIMESTAMP]);
+ setNameComponent(*i2, command_interest::POS_TIMESTAMP,
+ i1->getName()[command_interest::POS_TIMESTAMP]);
assertReject(*i2, CommandInterestValidator::ErrorCode::TIMESTAMP_REORDER);
advanceClocks(time::seconds(2));
@@ -302,7 +302,7 @@
auto i1 = makeCommandInterest(1); // signed at 0ms
auto i2 = makeCommandInterest(2); // signed at 0ms
for (auto interest : {i1, i2}) {
- setNameComponent(*interest, signed_interest::POS_TIMESTAMP,
+ setNameComponent(*interest, command_interest::POS_TIMESTAMP,
name::Component::fromNumber(time::toUnixTimestamp(time::system_clock::now()).count()));
} // ensure timestamps are exactly 0ms