diff --git a/tests/unit-tests/security/command-interest-validator.t.cpp b/tests/unit-tests/security/command-interest-validator.t.cpp
index cb01b36..e8c4eeb 100644
--- a/tests/unit-tests/security/command-interest-validator.t.cpp
+++ b/tests/unit-tests/security/command-interest-validator.t.cpp
@@ -20,6 +20,7 @@
  */
 
 #include "security/command-interest-validator.hpp"
+#include "security/command-interest-signer.hpp"
 #include "security/signing-helpers.hpp"
 
 #include "boost-test.hpp"
@@ -35,10 +36,11 @@
 
 using namespace ndn::tests;
 
-class CommandInterestValidatorFixture : public IdentityManagementV1TimeFixture
+class CommandInterestValidatorFixture : public IdentityManagementTimeFixture
 {
 protected:
   CommandInterestValidatorFixture()
+    : signer(m_keyChain)
   {
     this->initialize(CommandInterestValidator::Options{});
   }
@@ -63,10 +65,8 @@
   shared_ptr<Interest>
   makeCommandInterest(uint64_t identity = 0)
   {
-    auto interest = makeInterest("/CommandInterestPrefix");
-    m_keyChain.sign(*interest, signingByIdentity(makeIdentity(identity)));
-    BOOST_TEST_MESSAGE("makeCommandInterest " << interest->getName());
-    return interest;
+    auto interest = signer.makeCommandInterest("/CommandInterestPrefix", signingByIdentity(makeIdentity(identity)));
+    return make_shared<Interest>(std::move(interest));
   }
 
   /** \brief check that validator accepts interest
@@ -75,7 +75,6 @@
   void
   assertAccept(const Interest& interest)
   {
-    BOOST_TEST_MESSAGE("assertAccept " << interest.getName());
     int nAccepts = 0;
     validator->validate(interest,
       [&nAccepts] (const shared_ptr<const Interest>&) { ++nAccepts; },
@@ -93,7 +92,6 @@
   void
   assertReject(const Interest& interest, CommandInterestValidator::ErrorCode error)
   {
-    BOOST_TEST_MESSAGE("assertReject " << interest.getName());
     int nRejects = 0;
     validator->validate(interest,
       [] (const shared_ptr<const Interest>&) {
@@ -109,6 +107,7 @@
   }
 
 protected:
+  CommandInterestSigner signer;
   DummyValidator* inner;
   unique_ptr<CommandInterestValidator> validator;
 };
diff --git a/tests/unit-tests/security/v2/key-chain.t.cpp b/tests/unit-tests/security/v2/key-chain.t.cpp
index 4eaf75e..d1a954c 100644
--- a/tests/unit-tests/security/v2/key-chain.t.cpp
+++ b/tests/unit-tests/security/v2/key-chain.t.cpp
@@ -47,6 +47,12 @@
     unsetenv("NDN_CLIENT_PIB");
     unsetenv("NDN_CLIENT_TPM");
   }
+
+  ~TestHomeAndPibFixture()
+  {
+    const_cast<std::string&>(KeyChain::getDefaultPibLocator()).clear();
+    const_cast<std::string&>(KeyChain::getDefaultTpmLocator()).clear();
+  }
 };
 
 struct PibPathConfigFileHome
diff --git a/tests/unit-tests/security/validator-config.t.cpp b/tests/unit-tests/security/validator-config.t.cpp
index 14ed721..74c29ae 100644
--- a/tests/unit-tests/security/validator-config.t.cpp
+++ b/tests/unit-tests/security/validator-config.t.cpp
@@ -49,12 +49,14 @@
 {
 public:
   ValidatorConfigFixture()
-    : face(nullptr, m_keyChain)
+    : m_v2KeyChain("pib-memory:", "tpm-memory:")
+    , face(nullptr, m_v2KeyChain)
     , validator(face)
   {
   }
 
 public:
+  v2::KeyChain m_v2KeyChain;
   Face face;
   ValidatorConfig validator;
 };
@@ -1078,8 +1080,8 @@
 struct FacesFixture : public ValidatorConfigFixture
 {
   FacesFixture()
-    : face1(io, m_keyChain, {true, true})
-    , face2(io, m_keyChain, {true, true})
+    : face1(io, m_v2KeyChain, {true, true})
+    , face2(io, m_v2KeyChain, {true, true})
     , readInterestOffset1(0)
     , readDataOffset1(0)
     , readInterestOffset2(0)
@@ -1486,11 +1488,11 @@
   advanceClocks(time::milliseconds(10), 20);
 }
 
-class DirectCertFetchFixture : public IdentityManagementV1TimeFixture
+class DirectCertFetchFixture : public ValidatorConfigFixture
 {
 public:
   DirectCertFetchFixture()
-    : clientFace(io, m_keyChain, {true, true})
+    : clientFace(io, m_v2KeyChain, {true, true})
     , validationResult(boost::logic::indeterminate)
   {
     auto certName = addIdentity(ca);
