diff --git a/tests/unit/security/certificate-bundle-fetcher.t.cpp b/tests/unit/security/certificate-bundle-fetcher.t.cpp
index 1d0cee9..0c300b7 100644
--- a/tests/unit/security/certificate-bundle-fetcher.t.cpp
+++ b/tests/unit/security/certificate-bundle-fetcher.t.cpp
@@ -23,8 +23,7 @@
 #include "ndn-cxx/security/validation-policy-simple-hierarchy.hpp"
 #include "ndn-cxx/util/regex/regex-pattern-list-matcher.hpp"
 
-#include "tests/boost-test.hpp"
-#include "tests/make-interest-data.hpp"
+#include "tests/test-common.hpp"
 #include "tests/unit/security/validator-fixture.hpp"
 
 namespace ndn {
diff --git a/tests/unit/security/certificate-cache.t.cpp b/tests/unit/security/certificate-cache.t.cpp
index 65614ac..7d60506 100644
--- a/tests/unit/security/certificate-cache.t.cpp
+++ b/tests/unit/security/certificate-cache.t.cpp
@@ -22,22 +22,23 @@
 #include "ndn-cxx/security/certificate-cache.hpp"
 
 #include "tests/boost-test.hpp"
-#include "tests/unit/identity-management-time-fixture.hpp"
+#include "tests/key-chain-fixture.hpp"
+#include "tests/unit/clock-fixture.hpp"
 
 namespace ndn {
 namespace security {
 inline namespace v2 {
 namespace tests {
 
-BOOST_AUTO_TEST_SUITE(Security)
+using namespace ndn::tests;
 
-class CertificateCacheFixture : public ndn::tests::IdentityManagementTimeFixture
+class CertificateCacheFixture : public ClockFixture, public KeyChainFixture
 {
 public:
   CertificateCacheFixture()
     : certCache(10_s)
   {
-    identity = addIdentity("/TestCertificateCache/");
+    identity = m_keyChain.createIdentity("/TestCertificateCache");
     cert = identity.getDefaultKey().getDefaultCertificate();
   }
 
@@ -47,6 +48,7 @@
   Certificate cert;
 };
 
+BOOST_AUTO_TEST_SUITE(Security)
 BOOST_FIXTURE_TEST_SUITE(TestCertificateCache, CertificateCacheFixture)
 
 BOOST_AUTO_TEST_CASE(RemovalTime)
diff --git a/tests/unit/security/certificate-fetcher-direct-fetch.t.cpp b/tests/unit/security/certificate-fetcher-direct-fetch.t.cpp
index 25e0be5..7757f5b 100644
--- a/tests/unit/security/certificate-fetcher-direct-fetch.t.cpp
+++ b/tests/unit/security/certificate-fetcher-direct-fetch.t.cpp
@@ -20,9 +20,10 @@
  */
 
 #include "ndn-cxx/security/certificate-fetcher-direct-fetch.hpp"
-#include "ndn-cxx/security/validation-policy-simple-hierarchy.hpp"
+
 #include "ndn-cxx/lp/nack.hpp"
 #include "ndn-cxx/lp/tags.hpp"
+#include "ndn-cxx/security/validation-policy-simple-hierarchy.hpp"
 
 #include "tests/boost-test.hpp"
 #include "tests/unit/security/validator-fixture.hpp"
diff --git a/tests/unit/security/certificate-fetcher-from-network.t.cpp b/tests/unit/security/certificate-fetcher-from-network.t.cpp
index 8437c22..caf941a 100644
--- a/tests/unit/security/certificate-fetcher-from-network.t.cpp
+++ b/tests/unit/security/certificate-fetcher-from-network.t.cpp
@@ -20,8 +20,9 @@
  */
 
 #include "ndn-cxx/security/certificate-fetcher-from-network.hpp"
-#include "ndn-cxx/security/validation-policy-simple-hierarchy.hpp"
+
 #include "ndn-cxx/lp/nack.hpp"
+#include "ndn-cxx/security/validation-policy-simple-hierarchy.hpp"
 
 #include "tests/boost-test.hpp"
 #include "tests/unit/security/validator-fixture.hpp"
diff --git a/tests/unit/security/certificate.t.cpp b/tests/unit/security/certificate.t.cpp
index f645dbd..1069584 100644
--- a/tests/unit/security/certificate.t.cpp
+++ b/tests/unit/security/certificate.t.cpp
@@ -24,7 +24,7 @@
 #include "ndn-cxx/security/certificate.hpp"
 
 #include "tests/boost-test.hpp"
-#include "tests/unit/unit-test-time-fixture.hpp"
+#include "tests/unit/clock-fixture.hpp"
 
 #include <boost/lexical_cast.hpp>
 
@@ -36,7 +36,7 @@
 using namespace ndn::tests;
 
 BOOST_AUTO_TEST_SUITE(Security)
-BOOST_FIXTURE_TEST_SUITE(TestCertificate, UnitTestTimeFixture)
+BOOST_FIXTURE_TEST_SUITE(TestCertificate, ClockFixture)
 
 const uint8_t PUBLIC_KEY[] = {
   0x30, 0x81, 0x9d, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01,
diff --git a/tests/unit/security/detail/certificate-bundle-decoder.t.cpp b/tests/unit/security/detail/certificate-bundle-decoder.t.cpp
index b6691ee..ae81c82 100644
--- a/tests/unit/security/detail/certificate-bundle-decoder.t.cpp
+++ b/tests/unit/security/detail/certificate-bundle-decoder.t.cpp
@@ -22,24 +22,24 @@
 #include "ndn-cxx/security/detail/certificate-bundle-decoder.hpp"
 
 #include "tests/boost-test.hpp"
-#include "tests/identity-management-fixture.hpp"
+#include "tests/key-chain-fixture.hpp"
 
 namespace ndn {
 namespace security {
 namespace detail {
 namespace tests {
 
-class CertificateBundleDecoderFixture : public ndn::tests::IdentityManagementFixture
+class CertificateBundleDecoderFixture : public ndn::tests::KeyChainFixture
 {
 protected:
   CertificateBundleDecoderFixture()
   {
-    auto id1 = addIdentity("/hello/world1");
+    auto id1 = m_keyChain.createIdentity("/hello/world1");
     auto cert1 = id1.getDefaultKey().getDefaultCertificate();
     certBlock1 = cert1.wireEncode();
     m_certs.push_back(certBlock1);
 
-    auto id2 = addIdentity("/hello/world2");
+    auto id2 = m_keyChain.createIdentity("/hello/world2");
     auto cert2 = id2.getDefaultKey().getDefaultCertificate();
     certBlock2 = cert2.wireEncode();
     m_certs.push_back(certBlock2);
@@ -54,7 +54,7 @@
   CertificateBundleDecoder cbd;
   Block certBlock1;
   Block certBlock2;
-  int nCertsCompleted = 0;
+  size_t nCertsCompleted = 0;
 
 private:
   std::vector<Block> m_certs;
diff --git a/tests/unit/security/digest-sha256.t.cpp b/tests/unit/security/digest-sha256.t.cpp
index 674aaf5..83d2ca7 100644
--- a/tests/unit/security/digest-sha256.t.cpp
+++ b/tests/unit/security/digest-sha256.t.cpp
@@ -25,16 +25,14 @@
 #include "ndn-cxx/util/string-helper.hpp"
 
 #include "tests/boost-test.hpp"
-#include "tests/identity-management-fixture.hpp"
+#include "tests/key-chain-fixture.hpp"
 
 namespace ndn {
 namespace security {
 namespace tests {
 
-using namespace ndn::tests;
-
 BOOST_AUTO_TEST_SUITE(Security)
-BOOST_FIXTURE_TEST_SUITE(TestDigestSha256, IdentityManagementFixture)
+BOOST_FIXTURE_TEST_SUITE(TestDigestSha256, ndn::tests::KeyChainFixture)
 
 BOOST_AUTO_TEST_CASE(Sha256)
 {
diff --git a/tests/unit/security/interest-signer.t.cpp b/tests/unit/security/interest-signer.t.cpp
index 6d054ff..735668c 100644
--- a/tests/unit/security/interest-signer.t.cpp
+++ b/tests/unit/security/interest-signer.t.cpp
@@ -20,10 +20,10 @@
  */
 
 #include "ndn-cxx/security/interest-signer.hpp"
-#include "ndn-cxx/security/signing-helpers.hpp"
 
 #include "tests/boost-test.hpp"
-#include "tests/unit/identity-management-time-fixture.hpp"
+#include "tests/key-chain-fixture.hpp"
+#include "tests/unit/clock-fixture.hpp"
 
 namespace ndn {
 namespace security {
@@ -31,12 +31,16 @@
 
 using namespace ndn::tests;
 
+class InterestSignerFixture : public ClockFixture, public KeyChainFixture
+{
+};
+
 BOOST_AUTO_TEST_SUITE(Security)
-BOOST_FIXTURE_TEST_SUITE(TestInterestSigner, IdentityManagementTimeFixture)
+BOOST_FIXTURE_TEST_SUITE(TestInterestSigner, InterestSignerFixture)
 
 BOOST_AUTO_TEST_CASE(V02)
 {
-  addIdentity("/test");
+  m_keyChain.createIdentity("/test");
 
   InterestSigner signer(m_keyChain);
   Interest i1 = signer.makeCommandInterest("/hello/world");
@@ -67,7 +71,7 @@
 
 BOOST_AUTO_TEST_CASE(V03)
 {
-  addIdentity("/test");
+  m_keyChain.createIdentity("/test");
 
   InterestSigner signer(m_keyChain);
   Interest i1("/hello/world");
diff --git a/tests/unit/security/key-chain.t.cpp b/tests/unit/security/key-chain.t.cpp
index b6dd0c6..a9e1eaf 100644
--- a/tests/unit/security/key-chain.t.cpp
+++ b/tests/unit/security/key-chain.t.cpp
@@ -20,12 +20,11 @@
  */
 
 #include "ndn-cxx/security/key-chain.hpp"
-#include "ndn-cxx/security/signing-helpers.hpp"
-#include "ndn-cxx/security/verification-helpers.hpp"
 #include "ndn-cxx/security/transform/private-key.hpp"
+#include "ndn-cxx/security/verification-helpers.hpp"
 
 #include "tests/boost-test.hpp"
-#include "tests/identity-management-fixture.hpp"
+#include "tests/key-chain-fixture.hpp"
 #include "tests/unit/test-home-env-saver.hpp"
 
 namespace ndn {
@@ -209,7 +208,7 @@
   BOOST_CHECK_EQUAL(keyChain.getTpm().getTpmLocator(), "tpm-memory:");
 }
 
-BOOST_FIXTURE_TEST_CASE(SigningWithCorruptedPibTpm, IdentityManagementFixture)
+BOOST_FIXTURE_TEST_CASE(SigningWithCorruptedPibTpm, KeyChainFixture)
 {
   Identity id = m_keyChain.createIdentity("/test");
 
@@ -223,7 +222,7 @@
   BOOST_CHECK_THROW(m_keyChain.sign(data, signingByIdentity(id)), KeyChain::InvalidSigningInfoError);
 }
 
-BOOST_FIXTURE_TEST_CASE(Management, IdentityManagementFixture)
+BOOST_FIXTURE_TEST_CASE(Management, KeyChainFixture)
 {
   Name identityName("/test/id");
   Name identity2Name("/test/id2");
@@ -320,9 +319,9 @@
   BOOST_CHECK(m_keyChain.getPib().getIdentities().find(identityName) == m_keyChain.getPib().getIdentities().end());
 }
 
-BOOST_FIXTURE_TEST_CASE(GeneralSigningInterface, IdentityManagementFixture)
+BOOST_FIXTURE_TEST_CASE(GeneralSigningInterface, KeyChainFixture)
 {
-  Identity id = addIdentity("/id");
+  Identity id = m_keyChain.createIdentity("/id");
   Key key = id.getDefaultKey();
   Certificate cert = key.getDefaultCertificate();
 
@@ -458,7 +457,7 @@
   }
 }
 
-BOOST_FIXTURE_TEST_CASE(PublicKeySigningDefaults, IdentityManagementFixture)
+BOOST_FIXTURE_TEST_CASE(PublicKeySigningDefaults, KeyChainFixture)
 {
   Data data("/test/data");
 
@@ -466,7 +465,7 @@
   BOOST_CHECK_THROW(m_keyChain.sign(data, signingByIdentity("/non-existing/identity")), KeyChain::InvalidSigningInfoError);
 
   // Create identity with EC key and the corresponding self-signed certificate
-  Identity id = addIdentity("/ndn/test/ec", EcKeyParams());
+  Identity id = m_keyChain.createIdentity("/ndn/test/ec", EcKeyParams());
   BOOST_CHECK_NO_THROW(m_keyChain.sign(data, signingByIdentity(id.getName())));
   BOOST_CHECK_EQUAL(data.getSignatureType(),
                     KeyChain::getSignatureType(EcKeyParams().getKeyType(), DigestAlgorithm::SHA256));
@@ -474,7 +473,7 @@
   BOOST_CHECK(id.getName().isPrefixOf(data.getKeyLocator()->getName()));
 
   // Create identity with RSA key and the corresponding self-signed certificate
-  id = addIdentity("/ndn/test/rsa", RsaKeyParams());
+  id = m_keyChain.createIdentity("/ndn/test/rsa", RsaKeyParams());
   BOOST_CHECK_NO_THROW(m_keyChain.sign(data, signingByIdentity(id.getName())));
   BOOST_CHECK_EQUAL(data.getSignatureType(),
                     KeyChain::getSignatureType(RsaKeyParams().getKeyType(), DigestAlgorithm::SHA256));
@@ -482,7 +481,7 @@
   BOOST_CHECK(id.getName().isPrefixOf(data.getKeyLocator()->getName()));
 }
 
-BOOST_FIXTURE_TEST_CASE(ImportPrivateKey, IdentityManagementFixture)
+BOOST_FIXTURE_TEST_CASE(ImportPrivateKey, KeyChainFixture)
 {
   Name keyName("/test/device2");
   std::string rawKey("nPSNOHyZKsg2WLqHAs7MXGb0sjQb4zCT");
@@ -494,9 +493,9 @@
   BOOST_CHECK_THROW(m_keyChain.importPrivateKey(keyName, key), KeyChain::Error);
 }
 
-BOOST_FIXTURE_TEST_CASE(ExportImport, IdentityManagementFixture)
+BOOST_FIXTURE_TEST_CASE(ExportImport, KeyChainFixture)
 {
-  Identity id = addIdentity("/TestKeyChain/ExportIdentity");
+  Identity id = m_keyChain.createIdentity("/TestKeyChain/ExportIdentity");
   Certificate cert = id.getDefaultKey().getDefaultCertificate();
 
   shared_ptr<SafeBag> exported = m_keyChain.exportSafeBag(cert, "1234", 4);
@@ -526,9 +525,9 @@
   BOOST_CHECK_EQUAL(m_keyChain.getTpm().hasKey(cert.getKeyName()), false);
 }
 
-BOOST_FIXTURE_TEST_CASE(SelfSignedCertValidity, IdentityManagementFixture)
+BOOST_FIXTURE_TEST_CASE(SelfSignedCertValidity, KeyChainFixture)
 {
-  Certificate cert = addIdentity("/Security/TestKeyChain/SelfSignedCertValidity")
+  Certificate cert = m_keyChain.createIdentity("/Security/TestKeyChain/SelfSignedCertValidity")
                        .getDefaultKey()
                        .getDefaultCertificate();
   BOOST_CHECK(cert.isValid());
diff --git a/tests/unit/security/pib/impl/key-impl.t.cpp b/tests/unit/security/pib/impl/key-impl.t.cpp
index b2dfd96..be986a1 100644
--- a/tests/unit/security/pib/impl/key-impl.t.cpp
+++ b/tests/unit/security/pib/impl/key-impl.t.cpp
@@ -24,7 +24,7 @@
 #include "ndn-cxx/security/pib/pib.hpp"
 
 #include "tests/boost-test.hpp"
-#include "tests/identity-management-fixture.hpp"
+#include "tests/key-chain-fixture.hpp"
 #include "tests/unit/security/pib/pib-data-fixture.hpp"
 
 namespace ndn {
@@ -131,7 +131,7 @@
 }
 
 class OverwriteFixture : public ndn::security::tests::PibDataFixture,
-                         public ndn::tests::IdentityManagementFixture
+                         public ndn::tests::KeyChainFixture
 {
 };
 
diff --git a/tests/unit/security/pib/pib-data-fixture.cpp b/tests/unit/security/pib/pib-data-fixture.cpp
index e88c48e..b641f31 100644
--- a/tests/unit/security/pib/pib-data-fixture.cpp
+++ b/tests/unit/security/pib/pib-data-fixture.cpp
@@ -21,11 +21,14 @@
 
 #include "tests/unit/security/pib/pib-data-fixture.hpp"
 
-// #include "ndn-cxx/security/pib/pib-memory.hpp"
+// #include "ndn-cxx/security/pib/impl/pib-memory.hpp"
+// #include "ndn-cxx/security/tpm/impl/back-end-mem.hpp"
 // #include "ndn-cxx/security/tpm/tpm.hpp"
-// #include "ndn-cxx/security/tpm/back-end-mem.hpp"
+// #include "ndn-cxx/util/string-helper.hpp"
 
-// #include <fstream>
+// #include "tests/boost-test.hpp"
+
+// #include <iostream>
 
 namespace ndn {
 namespace security {
@@ -50,7 +53,7 @@
 //         certName
 //           .append("issuer")
 //           .appendVersion(certVersion);
-//         v2::Certificate cert;
+//         Certificate cert;
 //         cert.setName(certName);
 //         cert.setFreshnessPeriod(1_h);
 //         cert.setContent(tpm.getPublicKey(keyName));
@@ -58,14 +61,13 @@
 //         // TODO: sign using KeyChain
 //         SignatureInfo info;
 //         info.setSignatureType(tlv::SignatureSha256WithEcdsa);
-//         info.setKeyLocator(KeyLocator(keyName));
+//         info.setKeyLocator(keyName);
 //         info.setValidityPeriod(ValidityPeriod(time::fromIsoString("20170102T000000"),
 //                                               time::fromIsoString("20180102T000000")));
 //         cert.setSignatureInfo(info);
 
 //         EncodingBuffer buf;
 //         cert.wireEncode(buf, true);
-
 //         cert.setSignatureValue(tpm.sign(buf.buf(), buf.size(), keyName, DigestAlgorithm::SHA256));
 
 //         printBytes(prefix + "_KEY" + to_string(keyId) + "_CERT" + to_string(certVersion),
@@ -83,7 +85,7 @@
 //   static void
 //   printBytes(const std::string& name, const Buffer& buffer)
 //   {
-//     printBytes(name, buffer.buf(), buffer.size());
+//     printBytes(name, buffer.data(), buffer.size());
 //   }
 
 //   static void
@@ -108,7 +110,7 @@
 //               << "};" << std::endl;
 //   }
 
-// public:
+// private:
 //   pib::PibMemory pib;
 //   Tpm tpm;
 // };
diff --git a/tests/unit/security/pib/pib-data-fixture.hpp b/tests/unit/security/pib/pib-data-fixture.hpp
index 66e65eb..0009d0f 100644
--- a/tests/unit/security/pib/pib-data-fixture.hpp
+++ b/tests/unit/security/pib/pib-data-fixture.hpp
@@ -19,8 +19,8 @@
  * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
  */
 
-#ifndef NDN_TESTS_UNIT_SECURITY_PIB_DATA_FIXTURE_HPP
-#define NDN_TESTS_UNIT_SECURITY_PIB_DATA_FIXTURE_HPP
+#ifndef NDN_CXX_TESTS_UNIT_SECURITY_PIB_PIB_DATA_FIXTURE_HPP
+#define NDN_CXX_TESTS_UNIT_SECURITY_PIB_PIB_DATA_FIXTURE_HPP
 
 #include "ndn-cxx/security/certificate.hpp"
 
@@ -61,4 +61,4 @@
 } // namespace security
 } // namespace ndn
 
-#endif // NDN_TESTS_UNIT_SECURITY_PIB_DATA_FIXTURE_HPP
+#endif // NDN_CXX_TESTS_UNIT_SECURITY_PIB_PIB_DATA_FIXTURE_HPP
diff --git a/tests/unit/security/pib/pib-impl.t.cpp b/tests/unit/security/pib/pib-impl.t.cpp
index e16f658..971d995 100644
--- a/tests/unit/security/pib/pib-impl.t.cpp
+++ b/tests/unit/security/pib/pib-impl.t.cpp
@@ -52,20 +52,16 @@
 class PibSqlite3Fixture : public PibDataFixture
 {
 public:
-  PibSqlite3Fixture()
-    : tmpPath(boost::filesystem::path(UNIT_TEST_CONFIG_PATH) / "DbTest")
-    , pib(tmpPath.c_str())
-  {
-  }
-
   ~PibSqlite3Fixture()
   {
-    boost::filesystem::remove_all(tmpPath);
+    boost::filesystem::remove_all(m_path);
   }
 
+private:
+  const boost::filesystem::path m_path{boost::filesystem::path(UNIT_TESTS_TMPDIR) / "TestPibImpl"};
+
 public:
-  boost::filesystem::path tmpPath;
-  PibSqlite3 pib;
+  PibSqlite3 pib{m_path.string()};
 };
 
 using PibImpls = boost::mpl::vector<PibMemoryFixture, PibSqlite3Fixture>;
diff --git a/tests/unit/security/signature-sha256-with-ecdsa.t.cpp b/tests/unit/security/signature-sha256-with-ecdsa.t.cpp
index 3881756..de5edb9 100644
--- a/tests/unit/security/signature-sha256-with-ecdsa.t.cpp
+++ b/tests/unit/security/signature-sha256-with-ecdsa.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2019 Regents of the University of California.
+ * Copyright (c) 2013-2020 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -23,9 +23,8 @@
 #include "ndn-cxx/security/verification-helpers.hpp"
 #include "ndn-cxx/util/scheduler.hpp"
 
-#include "tests/boost-test.hpp"
-#include "tests/make-interest-data.hpp"
-#include "tests/unit/identity-management-time-fixture.hpp"
+#include "tests/test-common.hpp"
+#include "tests/unit/io-key-chain-fixture.hpp"
 
 namespace ndn {
 namespace security {
@@ -33,11 +32,11 @@
 
 using namespace ndn::tests;
 
-class SignatureSha256EcdsaTimeFixture : public IdentityManagementTimeFixture
+class SignatureSha256EcdsaTimeFixture : public IoKeyChainFixture
 {
 public:
   SignatureSha256EcdsaTimeFixture()
-    : scheduler(io)
+    : scheduler(m_io)
   {
   }
 
@@ -108,7 +107,7 @@
 
 BOOST_AUTO_TEST_CASE(DataSignature)
 {
-  Identity identity = addIdentity("/SecurityTestSignatureSha256WithEcdsa/DataSignature", EcKeyParams());
+  Identity identity = m_keyChain.createIdentity("/SecurityTestSignatureSha256WithEcdsa/DataSignature", EcKeyParams());
 
   Data testData("/SecurityTestSignatureSha256WithEcdsa/DataSignature/Data1");
   char content[5] = "1234";
@@ -123,7 +122,7 @@
 
 BOOST_AUTO_TEST_CASE(InterestSignature)
 {
-  Identity identity = addIdentity("/SecurityTestSignatureSha256WithEcdsa/InterestSignature", EcKeyParams());
+  Identity identity = m_keyChain.createIdentity("/SecurityTestSignatureSha256WithEcdsa/InterestSignature", EcKeyParams());
 
   auto interest = makeInterest("/SecurityTestSignatureSha256WithEcdsa/InterestSignature/Interest1");
   auto interest11 = makeInterest("/SecurityTestSignatureSha256WithEcdsa/InterestSignature/Interest1");
diff --git a/tests/unit/security/signature-sha256-with-rsa.t.cpp b/tests/unit/security/signature-sha256-with-rsa.t.cpp
index 2363551..d52d923 100644
--- a/tests/unit/security/signature-sha256-with-rsa.t.cpp
+++ b/tests/unit/security/signature-sha256-with-rsa.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2019 Regents of the University of California.
+ * Copyright (c) 2013-2020 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -23,9 +23,8 @@
 #include "ndn-cxx/security/verification-helpers.hpp"
 #include "ndn-cxx/util/scheduler.hpp"
 
-#include "tests/boost-test.hpp"
-#include "tests/make-interest-data.hpp"
-#include "tests/unit/identity-management-time-fixture.hpp"
+#include "tests/test-common.hpp"
+#include "tests/unit/io-key-chain-fixture.hpp"
 
 namespace ndn {
 namespace security {
@@ -33,11 +32,11 @@
 
 using namespace ndn::tests;
 
-class SignatureSha256RsaTimeFixture : public IdentityManagementTimeFixture
+class SignatureSha256RsaTimeFixture : public IoKeyChainFixture
 {
 public:
   SignatureSha256RsaTimeFixture()
-    : scheduler(io)
+    : scheduler(m_io)
   {
   }
 
@@ -113,7 +112,7 @@
 
 BOOST_AUTO_TEST_CASE(DataSignature)
 {
-  Identity identity = addIdentity("/SecurityTestSignatureSha256WithRsa/DataSignature", RsaKeyParams());
+  Identity identity = m_keyChain.createIdentity("/SecurityTestSignatureSha256WithRsa/DataSignature", RsaKeyParams());
 
   Data testData("/SecurityTestSignatureSha256WithRsa/DataSignature/Data1");
   char content[5] = "1234";
@@ -128,7 +127,7 @@
 
 BOOST_AUTO_TEST_CASE(InterestSignature)
 {
-  Identity identity = addIdentity("/SecurityTestSignatureSha256WithRsa/InterestSignature", RsaKeyParams());
+  Identity identity = m_keyChain.createIdentity("/SecurityTestSignatureSha256WithRsa/InterestSignature", RsaKeyParams());
 
   auto interest = makeInterest("/SecurityTestSignatureSha256WithRsa/InterestSignature/Interest1");
   auto interest11 = makeInterest("/SecurityTestSignatureSha256WithRsa/InterestSignature/Interest1");
diff --git a/tests/unit/security/signing-helpers.t.cpp b/tests/unit/security/signing-helpers.t.cpp
index f4493fe..a515c16 100644
--- a/tests/unit/security/signing-helpers.t.cpp
+++ b/tests/unit/security/signing-helpers.t.cpp
@@ -30,8 +30,6 @@
 BOOST_AUTO_TEST_SUITE(Security)
 BOOST_AUTO_TEST_SUITE(TestSigningHelpers)
 
-// update of this test case deferred until the new IdentityManagementFixture is available
-
 BOOST_AUTO_TEST_CASE(Identity)
 {
   Name identity("/identity");
diff --git a/tests/unit/security/tpm/back-end-wrapper-file.hpp b/tests/unit/security/tpm/back-end-wrapper-file.hpp
index 16b9bf2..2689e07 100644
--- a/tests/unit/security/tpm/back-end-wrapper-file.hpp
+++ b/tests/unit/security/tpm/back-end-wrapper-file.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2019 Regents of the University of California.
+ * Copyright (c) 2013-2020 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -38,7 +38,7 @@
 {
 public:
   BackEndWrapperFile()
-    : m_tmpPath(boost::filesystem::path(UNIT_TEST_CONFIG_PATH) / "TpmFileTest")
+    : m_tmpPath(boost::filesystem::path(UNIT_TESTS_TMPDIR) / "TpmBackEndFile")
     , m_impl(make_unique<BackEndFile>(m_tmpPath.string()))
   {
   }
diff --git a/tests/unit/security/trust-anchor-container.t.cpp b/tests/unit/security/trust-anchor-container.t.cpp
index b25805f..18da58a 100644
--- a/tests/unit/security/trust-anchor-container.t.cpp
+++ b/tests/unit/security/trust-anchor-container.t.cpp
@@ -23,7 +23,8 @@
 #include "ndn-cxx/util/io.hpp"
 
 #include "tests/boost-test.hpp"
-#include "tests/unit/identity-management-time-fixture.hpp"
+#include "tests/key-chain-fixture.hpp"
+#include "tests/unit/clock-fixture.hpp"
 
 #include <boost/filesystem.hpp>
 
@@ -34,47 +35,37 @@
 
 using namespace ndn::tests;
 
-BOOST_AUTO_TEST_SUITE(Security)
-
 /**
  * This fixture creates a directory and prepares two certificates.
  * cert1 is written to a file under the directory, while cert2 is not.
  */
-class AnchorContainerTestFixture : public IdentityManagementTimeFixture
+class TrustAnchorContainerFixture : public ClockFixture, public KeyChainFixture
 {
 public:
-  AnchorContainerTestFixture()
+  TrustAnchorContainerFixture()
   {
-    namespace fs = boost::filesystem;
+    boost::filesystem::create_directories(certDirPath);
 
-    fs::create_directory(fs::path(UNIT_TEST_CONFIG_PATH));
-
-    certDirPath = fs::path(UNIT_TEST_CONFIG_PATH) / "test-cert-dir";
-    fs::create_directory(certDirPath);
-
-    certPath1 = fs::path(UNIT_TEST_CONFIG_PATH) / "test-cert-dir" / "trust-anchor-1.cert";
-    certPath2 = fs::path(UNIT_TEST_CONFIG_PATH) / "test-cert-dir" / "trust-anchor-2.cert";
-
-    identity1 = addIdentity("/TestAnchorContainer/First");
+    identity1 = m_keyChain.createIdentity("/TestAnchorContainer/First");
     cert1 = identity1.getDefaultKey().getDefaultCertificate();
-    saveCertToFile(cert1, certPath1.string());
+    saveCert(cert1, certPath1.string());
 
-    identity2 = addIdentity("/TestAnchorContainer/Second");
+    identity2 = m_keyChain.createIdentity("/TestAnchorContainer/Second");
     cert2 = identity2.getDefaultKey().getDefaultCertificate();
-    saveCertToFile(cert2, certPath2.string());
+    saveCert(cert2, certPath2.string());
   }
 
-  ~AnchorContainerTestFixture()
+  ~TrustAnchorContainerFixture() override
   {
-    boost::filesystem::remove_all(UNIT_TEST_CONFIG_PATH);
+    boost::filesystem::remove_all(certDirPath);
   }
 
 public:
-  TrustAnchorContainer anchorContainer;
+  const boost::filesystem::path certDirPath{boost::filesystem::path(UNIT_TESTS_TMPDIR) / "test-cert-dir"};
+  const boost::filesystem::path certPath1{certDirPath / "trust-anchor-1.cert"};
+  const boost::filesystem::path certPath2{certDirPath / "trust-anchor-2.cert"};
 
-  boost::filesystem::path certDirPath;
-  boost::filesystem::path certPath1;
-  boost::filesystem::path certPath2;
+  TrustAnchorContainer anchorContainer;
 
   Identity identity1;
   Identity identity2;
@@ -83,7 +74,8 @@
   Certificate cert2;
 };
 
-BOOST_FIXTURE_TEST_SUITE(TestTrustAnchorContainer, AnchorContainerTestFixture)
+BOOST_AUTO_TEST_SUITE(Security)
+BOOST_FIXTURE_TEST_SUITE(TestTrustAnchorContainer, TrustAnchorContainerFixture)
 
 // one static group and one dynamic group created from file
 BOOST_AUTO_TEST_CASE(Insert)
@@ -138,7 +130,7 @@
   BOOST_CHECK(anchorContainer.find(identity2.getName()) == nullptr);
   BOOST_CHECK_EQUAL(anchorContainer.getGroup("group").size(), 1);
 
-  saveCertToFile(cert2, certPath2.string());
+  saveCert(cert2, certPath2.string());
 
   advanceClocks(100_ms, 11);
 
@@ -155,7 +147,7 @@
   BOOST_CHECK_EQUAL(anchorContainer.getGroup("group").size(), 0);
 }
 
-BOOST_FIXTURE_TEST_CASE(FindByInterest, AnchorContainerTestFixture)
+BOOST_AUTO_TEST_CASE(FindByInterest)
 {
   anchorContainer.insert("group1", certPath1.string(), 1_s);
   Interest interest(identity1.getName());
@@ -165,9 +157,9 @@
   Interest interest2(Name(identity1.getName()).appendVersion());
   BOOST_CHECK(anchorContainer.find(interest2) == nullptr);
 
-  Certificate cert3 = addCertificate(identity1.getDefaultKey(), "3");
-  Certificate cert4 = addCertificate(identity1.getDefaultKey(), "4");
-  Certificate cert5 = addCertificate(identity1.getDefaultKey(), "5");
+  auto cert3 = makeCert(identity1.getDefaultKey(), "3");
+  auto cert4 = makeCert(identity1.getDefaultKey(), "4");
+  auto cert5 = makeCert(identity1.getDefaultKey(), "5");
 
   Certificate cert3Copy = cert3;
   anchorContainer.insert("group2", std::move(cert3Copy));
diff --git a/tests/unit/security/validation-policy-accept-all.t.cpp b/tests/unit/security/validation-policy-accept-all.t.cpp
index 6a9f0f1..cd94cf7 100644
--- a/tests/unit/security/validation-policy-accept-all.t.cpp
+++ b/tests/unit/security/validation-policy-accept-all.t.cpp
@@ -40,7 +40,7 @@
 public:
   ValidationPolicyAcceptAllFixture()
   {
-    identity = addIdentity("/Security/TestValidationPolicyAcceptAll");
+    identity = m_keyChain.createIdentity("/Security/TestValidationPolicyAcceptAll");
     // don't add trust anchors
   }
 
diff --git a/tests/unit/security/validation-policy-command-interest.t.cpp b/tests/unit/security/validation-policy-command-interest.t.cpp
index 9f32056..9b8f360 100644
--- a/tests/unit/security/validation-policy-command-interest.t.cpp
+++ b/tests/unit/security/validation-policy-command-interest.t.cpp
@@ -20,13 +20,12 @@
  */
 
 #include "ndn-cxx/security/validation-policy-command-interest.hpp"
+
 #include "ndn-cxx/security/command-interest-signer.hpp"
-#include "ndn-cxx/security/signing-helpers.hpp"
 #include "ndn-cxx/security/validation-policy-accept-all.hpp"
 #include "ndn-cxx/security/validation-policy-simple-hierarchy.hpp"
 
-#include "tests/boost-test.hpp"
-#include "tests/make-interest-data.hpp"
+#include "tests/test-common.hpp"
 #include "tests/unit/security/validator-fixture.hpp"
 
 #include <boost/lexical_cast.hpp>
@@ -239,7 +238,7 @@
   advanceClocks(1_s);
   auto i3 = makeCommandInterest(identity); // signed at +2s
 
-  systemClock->advance(-18_s); // verifying at -16s
+  m_systemClock->advance(-18_s); // verifying at -16s
   VALIDATE_FAILURE(i1, "Should fail (timestamp outside the grace period)");
   rewindClockAfterValidation();
 
@@ -277,11 +276,11 @@
   advanceClocks(300_ms);
   auto i4 = makeCommandInterest(identity); // signed at +1400ms
 
-  systemClock->advance(-300_ms); // verifying at +1100ms
+  m_systemClock->advance(-300_ms); // verifying at +1100ms
   VALIDATE_SUCCESS(i1, "Should succeed");
   rewindClockAfterValidation();
 
-  systemClock->advance(-1100_ms); // verifying at 0ms
+  m_systemClock->advance(-1100_ms); // verifying at 0ms
   VALIDATE_FAILURE(i2, "Should fail (timestamp reordered)");
   rewindClockAfterValidation();
 
@@ -400,7 +399,7 @@
 BOOST_FIXTURE_TEST_CASE(UnlimitedRecords, ValidationPolicyCommandInterestFixture<UnlimitedRecordsOptions>)
 {
   std::vector<Identity> identities;
-  for (int i = 0; i < 20; ++i) {
+  for (size_t i = 0; i < 20; ++i) {
     Identity id = this->addSubCertificate("/Security/ValidatorFixture/Sub" + to_string(i), identity);
     this->cache.insert(id.getDefaultKey().getDefaultCertificate());
     identities.push_back(id);
@@ -408,7 +407,7 @@
 
   auto i1 = makeCommandInterest(identities.at(0)); // signed at 0s
   advanceClocks(1_s);
-  for (int i = 0; i < 20; ++i) {
+  for (size_t i = 0; i < 20; ++i) {
     auto i2 = makeCommandInterest(identities.at(i)); // signed at +1s
 
     VALIDATE_SUCCESS(i2, "Should succeed");
@@ -462,7 +461,7 @@
   advanceClocks(120_s);
   auto i3 = makeCommandInterest(identity); // signed at +360s
 
-  systemClock->advance(-360_s); // rewind system clock to 0s
+  m_systemClock->advance(-360_s); // rewind system clock to 0s
   VALIDATE_SUCCESS(i1, "Should succeed");
   rewindClockAfterValidation();
 
diff --git a/tests/unit/security/validation-policy-config.t.cpp b/tests/unit/security/validation-policy-config.t.cpp
index e660598..38c5986 100644
--- a/tests/unit/security/validation-policy-config.t.cpp
+++ b/tests/unit/security/validation-policy-config.t.cpp
@@ -20,10 +20,10 @@
  */
 
 #include "ndn-cxx/security/validation-policy-config.hpp"
+
 #include "ndn-cxx/security/transform/base64-encode.hpp"
 #include "ndn-cxx/security/transform/buffer-source.hpp"
 #include "ndn-cxx/security/transform/stream-sink.hpp"
-#include "ndn-cxx/util/logger.hpp"
 #include "ndn-cxx/util/io.hpp"
 
 #include "tests/boost-test.hpp"
@@ -91,7 +91,7 @@
 {
 public:
   ValidationPolicyConfigFixture()
-    : path(boost::filesystem::path(UNIT_TEST_CONFIG_PATH) / "security" / "v2" / "validation-policy-config")
+    : path(boost::filesystem::path(UNIT_TESTS_TMPDIR) / "security" / "validation-policy-config")
   {
     boost::filesystem::create_directories(path);
     baseConfig = R"CONF(
@@ -116,8 +116,7 @@
 
   ~ValidationPolicyConfigFixture()
   {
-    boost::system::error_code ec;
-    boost::filesystem::remove_all(path, ec);
+    boost::filesystem::remove_all(path);
   }
 
 protected:
@@ -135,7 +134,7 @@
   {
     BOOST_CHECK_EQUAL(this->policy.m_isConfigured, false);
 
-    this->saveCertificate(this->identity, (this->path / "identity.ndncert").string());
+    this->saveIdentityCert(this->identity, (this->path / "identity.ndncert").string());
     this->policy.load(this->baseConfig + R"CONF(
         trust-anchor
         {
@@ -167,7 +166,7 @@
         )CONF";
     }
 
-    this->saveCertificate(this->identity, (this->path / "identity.ndncert").string());
+    this->saveIdentityCert(this->identity, (this->path / "identity.ndncert").string());
 
     BOOST_CHECK_EQUAL(this->policy.m_isConfigured, false);
 
@@ -192,7 +191,7 @@
         }
       )CONF");
 
-    this->saveCertificate(this->identity, (this->path / "identity.ndncert").string());
+    this->saveIdentityCert(this->identity, (this->path / "identity.ndncert").string());
 
     BOOST_CHECK_EQUAL(this->policy.m_isConfigured, false);
 
@@ -298,7 +297,7 @@
     BOOST_CHECK_EQUAL(this->policy.m_isConfigured, false);
 
     boost::filesystem::create_directories(this->path / "keys");
-    this->saveCertificate(this->identity, (this->path / "keys" / "identity.ndncert").string());
+    this->saveIdentityCert(this->identity, (this->path / "keys" / "identity.ndncert").string());
 
     this->policy.load(this->baseConfig + R"CONF(
         trust-anchor
diff --git a/tests/unit/security/validation-policy-signed-interest.t.cpp b/tests/unit/security/validation-policy-signed-interest.t.cpp
index f46e5ad..d9cddb5 100644
--- a/tests/unit/security/validation-policy-signed-interest.t.cpp
+++ b/tests/unit/security/validation-policy-signed-interest.t.cpp
@@ -20,13 +20,12 @@
  */
 
 #include "ndn-cxx/security/validation-policy-signed-interest.hpp"
+
 #include "ndn-cxx/security/interest-signer.hpp"
-#include "ndn-cxx/security/signing-helpers.hpp"
 #include "ndn-cxx/security/validation-policy-accept-all.hpp"
 #include "ndn-cxx/security/validation-policy-simple-hierarchy.hpp"
 
-#include "tests/boost-test.hpp"
-#include "tests/make-interest-data.hpp"
+#include "tests/test-common.hpp"
 #include "tests/unit/security/validator-fixture.hpp"
 
 #include <boost/lexical_cast.hpp>
@@ -188,7 +187,7 @@
 BOOST_FIXTURE_TEST_CASE(UnlimitedRecords, ValidationPolicySignedInterestFixture<UnlimitedRecordsOptions>)
 {
   std::vector<Identity> identities;
-  for (int i = 0; i < 20; ++i) {
+  for (size_t i = 0; i < 20; ++i) {
     Identity id = addSubCertificate("/Security/ValidatorFixture/Sub" + to_string(i), identity);
     cache.insert(id.getDefaultKey().getDefaultCertificate());
     identities.push_back(id);
@@ -196,7 +195,7 @@
 
   auto i1 = makeSignedInterest(identities.at(0)); // signed at 0s
   advanceClocks(1_s);
-  for (int i = 0; i < 20; ++i) {
+  for (size_t i = 0; i < 20; ++i) {
     auto i2 = makeSignedInterest(identities.at(i)); // signed at +1s
 
     VALIDATE_SUCCESS(i2, "Should succeed");
@@ -295,7 +294,7 @@
   advanceClocks(1_s);
   auto i3 = makeSignedInterest(identity); // signed at +2s
 
-  systemClock->advance(-18_s); // verifying at -16s
+  m_systemClock->advance(-18_s); // verifying at -16s
   VALIDATE_FAILURE(i1, "Should fail (timestamp outside the grace period)");
   rewindClockAfterValidation();
 
@@ -334,11 +333,11 @@
   advanceClocks(300_ms);
   auto i4 = makeSignedInterest(identity); // signed at +1400ms
 
-  systemClock->advance(-300_ms); // verifying at +1100ms
+  m_systemClock->advance(-300_ms); // verifying at +1100ms
   VALIDATE_SUCCESS(i1, "Should succeed");
   rewindClockAfterValidation();
 
-  systemClock->advance(-1100_ms); // verifying at 0ms
+  m_systemClock->advance(-1100_ms); // verifying at 0ms
   VALIDATE_FAILURE(i2, "Should fail (timestamp reordered)");
   rewindClockAfterValidation();
 
diff --git a/tests/unit/security/validation-policy.t.cpp b/tests/unit/security/validation-policy.t.cpp
index 41cde4d..e982f72 100644
--- a/tests/unit/security/validation-policy.t.cpp
+++ b/tests/unit/security/validation-policy.t.cpp
@@ -22,21 +22,19 @@
 #include "ndn-cxx/security/validation-policy.hpp"
 
 #include "tests/boost-test.hpp"
-#include "tests/identity-management-fixture.hpp"
+#include "tests/key-chain-fixture.hpp"
 
 namespace ndn {
 namespace security {
 inline namespace v2 {
 namespace tests {
 
-using namespace ndn::tests;
-
 BOOST_AUTO_TEST_SUITE(Security)
-BOOST_FIXTURE_TEST_SUITE(TestValidationPolicy, IdentityManagementFixture)
+BOOST_FIXTURE_TEST_SUITE(TestValidationPolicy, ndn::tests::KeyChainFixture)
 
 BOOST_AUTO_TEST_CASE(ExtractIdentityNameFromKeyLocator)
 {
-  auto id = addIdentity("/random/identity");
+  auto id = m_keyChain.createIdentity("/random/identity");
 
   auto keyName = id.getDefaultKey().getName();
   auto certName = id.getDefaultKey().getDefaultCertificate().getName();
diff --git a/tests/unit/security/validator-config.t.cpp b/tests/unit/security/validator-config.t.cpp
index dac6913..0f4f694 100644
--- a/tests/unit/security/validator-config.t.cpp
+++ b/tests/unit/security/validator-config.t.cpp
@@ -20,12 +20,13 @@
  */
 
 #include "ndn-cxx/security/validator-config.hpp"
+
 #include "ndn-cxx/security/certificate-fetcher-offline.hpp"
 #include "ndn-cxx/security/command-interest-signer.hpp"
 #include "ndn-cxx/util/dummy-client-face.hpp"
 
 #include "tests/boost-test.hpp"
-#include "tests/identity-management-fixture.hpp"
+#include "tests/key-chain-fixture.hpp"
 #include "tests/unit/security/validator-config/common.hpp"
 
 namespace ndn {
@@ -35,7 +36,7 @@
 using namespace ndn::tests;
 
 BOOST_AUTO_TEST_SUITE(Security)
-BOOST_FIXTURE_TEST_SUITE(TestValidatorConfig, IdentityManagementFixture)
+BOOST_FIXTURE_TEST_SUITE(TestValidatorConfig, KeyChainFixture)
 
 // This test only for API, actual tests are in ValidationPolicyConfig and corresponding CertificateFetchers
 
@@ -46,16 +47,16 @@
   ValidatorConfig v1(face);
   BOOST_CHECK_EQUAL(v1.m_policyConfig.m_isConfigured, false);
 
-  ValidatorConfig v2(make_unique<v2::CertificateFetcherOffline>());
+  ValidatorConfig v2(make_unique<CertificateFetcherOffline>());
   BOOST_CHECK_EQUAL(v2.m_policyConfig.m_isConfigured, false);
 }
 
-class ValidatorConfigFixture : public IdentityManagementFixture
+class ValidatorConfigFixture : public KeyChainFixture
 {
 public:
   ValidatorConfigFixture()
-    : path(boost::filesystem::path(UNIT_TEST_CONFIG_PATH) / "security" / "validator-config")
-    , validator(make_unique<v2::CertificateFetcherOffline>())
+    : path(boost::filesystem::path(UNIT_TESTS_TMPDIR) / "security" / "validator-config")
+    , validator(make_unique<CertificateFetcherOffline>())
   {
     boost::filesystem::create_directories(path);
     config = R"CONF(
@@ -117,11 +118,11 @@
 
 BOOST_AUTO_TEST_CASE(FromSection)
 {
-  validator.load(v2::validator_config::tests::makeSection(config), "config-file-from-section");
+  validator.load(validator_config::tests::makeSection(config), "config-file-from-section");
   BOOST_CHECK_EQUAL(validator.m_policyConfig.m_isConfigured, true);
 
   // should reload policy
-  validator.load(v2::validator_config::tests::makeSection(config), "config-file-from-section");
+  validator.load(validator_config::tests::makeSection(config), "config-file-from-section");
   BOOST_CHECK_EQUAL(validator.m_policyConfig.m_isConfigured, true);
 }
 
diff --git a/tests/unit/security/validator-config/checker.t.cpp b/tests/unit/security/validator-config/checker.t.cpp
index 55e48a1..029996c 100644
--- a/tests/unit/security/validator-config/checker.t.cpp
+++ b/tests/unit/security/validator-config/checker.t.cpp
@@ -39,7 +39,7 @@
 BOOST_AUTO_TEST_SUITE(Security)
 BOOST_AUTO_TEST_SUITE(ValidatorConfig)
 
-class CheckerFixture : public IdentityManagementFixture
+class CheckerFixture : public KeyChainFixture
 {
 public:
   CheckerFixture()
diff --git a/tests/unit/security/validator-config/common.hpp b/tests/unit/security/validator-config/common.hpp
index de72e3f..c4a4fe3 100644
--- a/tests/unit/security/validator-config/common.hpp
+++ b/tests/unit/security/validator-config/common.hpp
@@ -19,8 +19,8 @@
  * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
  */
 
-#ifndef NDN_TESTS_SECURITY_V2_VALIDATOR_CONFIG_COMMON_HPP
-#define NDN_TESTS_SECURITY_V2_VALIDATOR_CONFIG_COMMON_HPP
+#ifndef NDN_CXX_TESTS_UNIT_SECURITY_VALIDATOR_CONFIG_COMMON_HPP
+#define NDN_CXX_TESTS_UNIT_SECURITY_VALIDATOR_CONFIG_COMMON_HPP
 
 #include "ndn-cxx/security/validator-config/common.hpp"
 
@@ -47,4 +47,4 @@
 } // namespace security
 } // namespace ndn
 
-#endif // NDN_TESTS_SECURITY_V2_VALIDATOR_CONFIG_COMMON_HPP
+#endif // NDN_CXX_TESTS_UNIT_SECURITY_VALIDATOR_CONFIG_COMMON_HPP
diff --git a/tests/unit/security/validator-config/filter.t.cpp b/tests/unit/security/validator-config/filter.t.cpp
index 9f6029e..5b77a12 100644
--- a/tests/unit/security/validator-config/filter.t.cpp
+++ b/tests/unit/security/validator-config/filter.t.cpp
@@ -22,7 +22,6 @@
 #include "ndn-cxx/security/validator-config/filter.hpp"
 
 #include "tests/boost-test.hpp"
-#include "tests/identity-management-fixture.hpp"
 #include "tests/unit/security/validator-config/common.hpp"
 #include "tests/unit/security/validator-fixture.hpp"
 
@@ -38,33 +37,35 @@
 BOOST_AUTO_TEST_SUITE(Security)
 BOOST_AUTO_TEST_SUITE(ValidatorConfig)
 
-BOOST_FIXTURE_TEST_SUITE(TestFilter, IdentityManagementFixture)
+BOOST_FIXTURE_TEST_SUITE(TestFilter, KeyChainFixture)
 
 #define CHECK_FOR_MATCHES(filter, same, longer, shorter, different) \
-  BOOST_CHECK_EQUAL(filter.match(tlv::Interest, InterestV02Pkt::makeName("/foo/bar", m_keyChain), \
-                                 InterestV02Pkt::makeState()), same);    \
-  BOOST_CHECK_EQUAL(filter.match(tlv::Interest, InterestV03Pkt::makeName("/foo/bar", m_keyChain), \
-                                 InterestV03Pkt::makeState()), same);    \
-  BOOST_CHECK_EQUAL(filter.match(tlv::Data, DataPkt::makeName("/foo/bar", m_keyChain), \
-                                 DataPkt::makeState()), same);           \
-  BOOST_CHECK_EQUAL(filter.match(tlv::Interest, InterestV02Pkt::makeName("/foo/bar/bar", m_keyChain), \
-                                 InterestV02Pkt::makeState()), longer);  \
-  BOOST_CHECK_EQUAL(filter.match(tlv::Interest, InterestV03Pkt::makeName("/foo/bar/bar", m_keyChain), \
-                                 InterestV03Pkt::makeState()), longer);  \
-  BOOST_CHECK_EQUAL(filter.match(tlv::Data, DataPkt::makeName("/foo/bar/bar", m_keyChain), \
-                                 DataPkt::makeState()), longer);         \
-  BOOST_CHECK_EQUAL(filter.match(tlv::Interest, InterestV02Pkt::makeName("/foo", m_keyChain), \
-                                 InterestV02Pkt::makeState()), shorter); \
-  BOOST_CHECK_EQUAL(filter.match(tlv::Interest, InterestV03Pkt::makeName("/foo", m_keyChain), \
-                                 InterestV03Pkt::makeState()), shorter); \
-  BOOST_CHECK_EQUAL(filter.match(tlv::Data, DataPkt::makeName("/foo", m_keyChain), \
-                                 DataPkt::makeState()), shorter);        \
-  BOOST_CHECK_EQUAL(filter.match(tlv::Interest, InterestV02Pkt::makeName("/other/prefix", m_keyChain), \
-                                 InterestV02Pkt::makeState()), different); \
-  BOOST_CHECK_EQUAL(filter.match(tlv::Interest, InterestV03Pkt::makeName("/other/prefix", m_keyChain), \
-                                 InterestV03Pkt::makeState()), different); \
-  BOOST_CHECK_EQUAL(filter.match(tlv::Data, DataPkt::makeName("/other/prefix", m_keyChain), \
-                                 DataPkt::makeState()), different);
+  do { \
+    BOOST_CHECK_EQUAL(filter.match(tlv::Interest, InterestV02Pkt::makeName("/foo/bar", m_keyChain), \
+                                   InterestV02Pkt::makeState()), same);    \
+    BOOST_CHECK_EQUAL(filter.match(tlv::Interest, InterestV03Pkt::makeName("/foo/bar", m_keyChain), \
+                                   InterestV03Pkt::makeState()), same);    \
+    BOOST_CHECK_EQUAL(filter.match(tlv::Data, DataPkt::makeName("/foo/bar", m_keyChain), \
+                                   DataPkt::makeState()), same);           \
+    BOOST_CHECK_EQUAL(filter.match(tlv::Interest, InterestV02Pkt::makeName("/foo/bar/bar", m_keyChain), \
+                                   InterestV02Pkt::makeState()), longer);  \
+    BOOST_CHECK_EQUAL(filter.match(tlv::Interest, InterestV03Pkt::makeName("/foo/bar/bar", m_keyChain), \
+                                   InterestV03Pkt::makeState()), longer);  \
+    BOOST_CHECK_EQUAL(filter.match(tlv::Data, DataPkt::makeName("/foo/bar/bar", m_keyChain), \
+                                   DataPkt::makeState()), longer);         \
+    BOOST_CHECK_EQUAL(filter.match(tlv::Interest, InterestV02Pkt::makeName("/foo", m_keyChain), \
+                                   InterestV02Pkt::makeState()), shorter); \
+    BOOST_CHECK_EQUAL(filter.match(tlv::Interest, InterestV03Pkt::makeName("/foo", m_keyChain), \
+                                   InterestV03Pkt::makeState()), shorter); \
+    BOOST_CHECK_EQUAL(filter.match(tlv::Data, DataPkt::makeName("/foo", m_keyChain), \
+                                   DataPkt::makeState()), shorter);        \
+    BOOST_CHECK_EQUAL(filter.match(tlv::Interest, InterestV02Pkt::makeName("/other/prefix", m_keyChain), \
+                                   InterestV02Pkt::makeState()), different); \
+    BOOST_CHECK_EQUAL(filter.match(tlv::Interest, InterestV03Pkt::makeName("/other/prefix", m_keyChain), \
+                                   InterestV03Pkt::makeState()), different); \
+    BOOST_CHECK_EQUAL(filter.match(tlv::Data, DataPkt::makeName("/other/prefix", m_keyChain), \
+                                   DataPkt::makeState()), different); \
+  } while (false)
 
 BOOST_AUTO_TEST_CASE(RelationName)
 {
@@ -90,7 +91,7 @@
   CHECK_FOR_MATCHES(f3, false, true, false, false);
 }
 
-BOOST_FIXTURE_TEST_SUITE(Create, IdentityManagementFixture)
+BOOST_FIXTURE_TEST_SUITE(Create, KeyChainFixture)
 
 BOOST_AUTO_TEST_CASE(Errors)
 {
diff --git a/tests/unit/security/validator-config/rule.t.cpp b/tests/unit/security/validator-config/rule.t.cpp
index 75eb6dc..04c6e8d 100644
--- a/tests/unit/security/validator-config/rule.t.cpp
+++ b/tests/unit/security/validator-config/rule.t.cpp
@@ -40,7 +40,7 @@
 BOOST_AUTO_TEST_SUITE(ValidatorConfig)
 
 template<class Packet>
-class RuleFixture : public IdentityManagementFixture
+class RuleFixture : public KeyChainFixture
 {
 public:
   RuleFixture()
diff --git a/tests/unit/security/validator-fixture.cpp b/tests/unit/security/validator-fixture.cpp
new file mode 100644
index 0000000..8bb4713
--- /dev/null
+++ b/tests/unit/security/validator-fixture.cpp
@@ -0,0 +1,103 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2013-2020 Regents of the University of California.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ *
+ * ndn-cxx library is free software: you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later version.
+ *
+ * ndn-cxx library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ *
+ * You should have received copies of the GNU General Public License and GNU Lesser
+ * General Public License along with ndn-cxx, e.g., in COPYING.md file.  If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ */
+
+#include "tests/unit/security/validator-fixture.hpp"
+
+#include "ndn-cxx/security/additional-description.hpp"
+
+namespace ndn {
+namespace security {
+inline namespace v2 {
+namespace tests {
+
+const time::milliseconds ValidatorFixtureBase::s_mockPeriod{250};
+const int ValidatorFixtureBase::s_mockTimes = 200;
+
+ValidatorFixtureBase::ValidatorFixtureBase()
+{
+  processInterest = [this] (const Interest& interest) {
+    auto cert = cache.find(interest);
+    if (cert != nullptr) {
+      face.receive(*cert);
+    }
+  };
+}
+
+void
+ValidatorFixtureBase::mockNetworkOperations()
+{
+  util::signal::ScopedConnection conn = face.onSendInterest.connect([this] (const Interest& interest) {
+    if (processInterest) {
+      m_io.post(bind(processInterest, interest));
+    }
+  });
+  advanceClocks(s_mockPeriod, s_mockTimes);
+}
+
+Identity
+ValidatorFixtureBase::addSubCertificate(const Name& subIdentityName, const Identity& issuer)
+{
+  auto subId = m_keyChain.createIdentity(subIdentityName);
+  auto cert = subId.getDefaultKey().getDefaultCertificate();
+  cert.setName(cert.getKeyName()
+               .append("parent")
+               .appendVersion());
+
+  SignatureInfo info;
+  auto now = time::system_clock::now();
+  info.setValidityPeriod(ValidityPeriod(now, now + 90_days));
+
+  AdditionalDescription description;
+  description.set("type", "sub-certificate");
+  info.addCustomTlv(description.wireEncode());
+
+  m_keyChain.sign(cert, signingByIdentity(issuer).setSignatureInfo(info));
+  m_keyChain.setDefaultCertificate(subId.getDefaultKey(), cert);
+
+  return subId;
+}
+
+Name
+InterestV02Pkt::makeName(Name name, KeyChain& keyChain)
+{
+  Interest interest(name);
+  interest.setCanBePrefix(false);
+  SigningInfo params;
+  params.setSignedInterestFormat(SignedInterestFormat::V02);
+  keyChain.sign(interest, params);
+  return interest.getName();
+}
+
+Name
+InterestV03Pkt::makeName(Name name, KeyChain& keyChain)
+{
+  Interest interest(name);
+  interest.setCanBePrefix(false);
+  SigningInfo params;
+  params.setSignedInterestFormat(SignedInterestFormat::V03);
+  keyChain.sign(interest, params);
+  return interest.getName();
+}
+
+} // namespace tests
+} // inline namespace v2
+} // namespace security
+} // namespace ndn
diff --git a/tests/unit/security/validator-fixture.hpp b/tests/unit/security/validator-fixture.hpp
index e9e5d5b..8da34f0 100644
--- a/tests/unit/security/validator-fixture.hpp
+++ b/tests/unit/security/validator-fixture.hpp
@@ -19,15 +19,15 @@
  * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
  */
 
-#ifndef NDN_TESTS_UNIT_SECURITY_VALIDATOR_FIXTURE_HPP
-#define NDN_TESTS_UNIT_SECURITY_VALIDATOR_FIXTURE_HPP
+#ifndef NDN_CXX_TESTS_UNIT_SECURITY_VALIDATOR_FIXTURE_HPP
+#define NDN_CXX_TESTS_UNIT_SECURITY_VALIDATOR_FIXTURE_HPP
 
 #include "ndn-cxx/security/validator.hpp"
 #include "ndn-cxx/security/certificate-fetcher-from-network.hpp"
 #include "ndn-cxx/util/dummy-client-face.hpp"
 
 #include "tests/boost-test.hpp"
-#include "tests/unit/identity-management-time-fixture.hpp"
+#include "tests/unit/io-key-chain-fixture.hpp"
 
 #include <boost/lexical_cast.hpp>
 
@@ -36,27 +36,54 @@
 inline namespace v2 {
 namespace tests {
 
-template<class ValidationPolicy, class CertificateFetcher = CertificateFetcherFromNetwork>
-class ValidatorFixture : public ndn::tests::IdentityManagementTimeFixture
+class ValidatorFixtureBase : public ndn::tests::IoKeyChainFixture
 {
-public:
-  ValidatorFixture()
-    : face(io, {true, true})
-    , validator(make_unique<ValidationPolicy>(), make_unique<CertificateFetcher>(face))
-    , policy(static_cast<ValidationPolicy&>(validator.getPolicy()))
-    , cache(100_days)
-    , lastError(ValidationError::Code::NO_ERROR)
+protected:
+  ValidatorFixtureBase();
+
+  void
+  mockNetworkOperations();
+
+  /** \brief undo clock advancement of mockNetworkOperations()
+   */
+  void
+  rewindClockAfterValidation()
   {
-    processInterest = [this] (const Interest& interest) {
-      auto cert = cache.find(interest);
-      if (cert != nullptr) {
-        face.receive(*cert);
-      }
-    };
+    m_systemClock->advance(s_mockPeriod * s_mockTimes * -1);
   }
 
-  virtual
-  ~ValidatorFixture() = default;
+  /**
+   * @brief Issues a certificate for @p subIdentityName signed by @p issuer
+   *
+   * If the identity does not exist, it is created.
+   * A new key is generated as the default key for the identity.
+   * A default certificate for the key is signed by the issuer using its default certificate.
+   *
+   * @return The sub-identity
+   */
+  Identity
+  addSubCertificate(const Name& subIdentityName, const Identity& issuer);
+
+protected:
+  util::DummyClientFace face{m_io, {true, true}};
+  std::function<void(const Interest&)> processInterest;
+  CertificateCache cache{100_days};
+  ValidationError lastError{ValidationError::Code::NO_ERROR};
+
+private:
+  const static time::milliseconds s_mockPeriod;
+  const static int s_mockTimes;
+};
+
+template<class ValidationPolicyT, class CertificateFetcherT = CertificateFetcherFromNetwork>
+class ValidatorFixture : public ValidatorFixtureBase
+{
+protected:
+  ValidatorFixture()
+    : validator(make_unique<ValidationPolicyT>(), make_unique<CertificateFetcherT>(face))
+    , policy(static_cast<ValidationPolicyT&>(validator.getPolicy()))
+  {
+  }
 
   template<class Packet>
   void
@@ -82,55 +109,21 @@
     BOOST_CHECK_EQUAL(nCallbacks, 1);
   }
 
-  void
-  mockNetworkOperations()
-  {
-    util::signal::ScopedConnection connection = face.onSendInterest.connect([this] (const Interest& interest) {
-        if (processInterest != nullptr) {
-          io.post(bind(processInterest, interest));
-        }
-      });
-    advanceClocks(time::milliseconds(s_mockPeriod), s_mockTimes);
-  }
-
-  /** \brief undo clock advancement of mockNetworkOperations
-   */
-  void
-  rewindClockAfterValidation()
-  {
-    this->systemClock->advance(time::milliseconds(s_mockPeriod * s_mockTimes * -1));
-  }
-
-public:
-  util::DummyClientFace face;
-  std::function<void(const Interest& interest)> processInterest;
+protected:
   Validator validator;
-  ValidationPolicy& policy;
-
-  CertificateCache cache;
-  ValidationError lastError;
-
-private:
-  const static int s_mockPeriod;
-  const static int s_mockTimes;
+  ValidationPolicyT& policy;
 };
 
-template<class ValidationPolicy, class CertificateFetcher>
-const int ValidatorFixture<ValidationPolicy, CertificateFetcher>::s_mockPeriod = 250;
-
-template<class ValidationPolicy, class CertificateFetcher>
-const int ValidatorFixture<ValidationPolicy, CertificateFetcher>::s_mockTimes = 200;
-
-template<class ValidationPolicy, class CertificateFetcher = CertificateFetcherFromNetwork>
-class HierarchicalValidatorFixture : public ValidatorFixture<ValidationPolicy, CertificateFetcher>
+template<class ValidationPolicyT, class CertificateFetcherT = CertificateFetcherFromNetwork>
+class HierarchicalValidatorFixture : public ValidatorFixture<ValidationPolicyT, CertificateFetcherT>
 {
-public:
+protected:
   HierarchicalValidatorFixture()
   {
-    identity = this->addIdentity("/Security/ValidatorFixture");
+    identity = this->m_keyChain.createIdentity("/Security/ValidatorFixture");
     subIdentity = this->addSubCertificate("/Security/ValidatorFixture/Sub1", identity);
-    subSelfSignedIdentity = this->addIdentity("/Security/ValidatorFixture/Sub1/Sub2");
-    otherIdentity = this->addIdentity("/Security/OtherIdentity");
+    subSelfSignedIdentity = this->m_keyChain.createIdentity("/Security/ValidatorFixture/Sub1/Sub2");
+    otherIdentity = this->m_keyChain.createIdentity("/Security/OtherIdentity");
 
     this->validator.loadAnchor("", Certificate(identity.getDefaultKey().getDefaultCertificate()));
 
@@ -140,34 +133,33 @@
     this->cache.insert(otherIdentity.getDefaultKey().getDefaultCertificate());
   }
 
-public:
+protected:
   Identity identity;
   Identity subIdentity;
   Identity subSelfSignedIdentity;
   Identity otherIdentity;
 };
 
-#define VALIDATE_SUCCESS(packet, message) this->template validate(packet, message, true, __LINE__)
-#define VALIDATE_FAILURE(packet, message) this->template validate(packet, message, false, __LINE__)
+#define VALIDATE_SUCCESS(packet, message) this->validate(packet, message, true, __LINE__)
+#define VALIDATE_FAILURE(packet, message) this->validate(packet, message, false, __LINE__)
 
 class DummyValidationState : public ValidationState
 {
 public:
-  ~DummyValidationState()
+  ~DummyValidationState() override
   {
     m_outcome = false;
   }
 
   void
-  fail(const ValidationError& error) override
+  fail(const ValidationError&) override
   {
-    // BOOST_TEST_MESSAGE(error);
     m_outcome = false;
   }
 
 private:
   void
-  verifyOriginalPacket(const Certificate& trustedCert) override
+  verifyOriginalPacket(const Certificate&) override
   {
     // do nothing
   }
@@ -179,17 +171,16 @@
   }
 };
 
-
 struct DataPkt
 {
-  static uint32_t
+  static constexpr uint32_t
   getType()
   {
     return tlv::Data;
   }
 
   static Name
-  makeName(Name name, KeyChain& keyChain)
+  makeName(Name name, KeyChain&)
   {
     return name;
   }
@@ -203,22 +194,14 @@
 
 struct InterestV02Pkt
 {
-  static uint32_t
+  static constexpr uint32_t
   getType()
   {
     return tlv::Interest;
   }
 
   static Name
-  makeName(Name name, KeyChain& keyChain)
-  {
-    Interest interest(name);
-    interest.setCanBePrefix(false);
-    SigningInfo params;
-    params.setSignedInterestFormat(SignedInterestFormat::V02);
-    keyChain.sign(interest, params);
-    return interest.getName();
-  }
+  makeName(Name name, KeyChain& keyChain);
 
   static shared_ptr<ValidationState>
   makeState()
@@ -231,22 +214,14 @@
 
 struct InterestV03Pkt
 {
-  static uint32_t
+  static constexpr uint32_t
   getType()
   {
     return tlv::Interest;
   }
 
   static Name
-  makeName(Name name, KeyChain& keyChain)
-  {
-    Interest interest(name);
-    interest.setCanBePrefix(false);
-    SigningInfo params;
-    params.setSignedInterestFormat(SignedInterestFormat::V03);
-    keyChain.sign(interest, params);
-    return interest.getName();
-  }
+  makeName(Name name, KeyChain& keyChain);
 
   static shared_ptr<ValidationState>
   makeState()
@@ -262,4 +237,4 @@
 } // namespace security
 } // namespace ndn
 
-#endif // NDN_TESTS_UNIT_SECURITY_VALIDATOR_FIXTURE_HPP
+#endif // NDN_CXX_TESTS_UNIT_SECURITY_VALIDATOR_FIXTURE_HPP
diff --git a/tests/unit/security/validator-null.t.cpp b/tests/unit/security/validator-null.t.cpp
index 103f8f7..9d04cb8 100644
--- a/tests/unit/security/validator-null.t.cpp
+++ b/tests/unit/security/validator-null.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2018 Regents of the University of California.
+ * Copyright (c) 2013-2020 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -22,21 +22,18 @@
 #include "ndn-cxx/security/validator-null.hpp"
 
 #include "tests/boost-test.hpp"
-#include "tests/identity-management-fixture.hpp"
-#include "tests/make-interest-data.hpp"
+#include "tests/key-chain-fixture.hpp"
 
 namespace ndn {
 namespace security {
 namespace tests {
 
-using namespace ndn::tests;
-
 BOOST_AUTO_TEST_SUITE(Security)
-BOOST_FIXTURE_TEST_SUITE(TestValidatorNull, IdentityManagementFixture)
+BOOST_FIXTURE_TEST_SUITE(TestValidatorNull, ndn::tests::KeyChainFixture)
 
 BOOST_AUTO_TEST_CASE(ValidateData)
 {
-  auto identity = addIdentity("/TestValidator/Null");
+  auto identity = m_keyChain.createIdentity("/TestValidator/Null");
   Data data("/Some/Other/Data/Name");
   m_keyChain.sign(data, signingByIdentity(identity));
 
@@ -48,7 +45,7 @@
 
 BOOST_AUTO_TEST_CASE(ValidateInterest)
 {
-  auto identity = addIdentity("/TestValidator/Null");
+  auto identity = m_keyChain.createIdentity("/TestValidator/Null");
   Interest interest("/Some/Other/Interest/Name");
   m_keyChain.sign(interest, signingByIdentity(identity));
 
diff --git a/tests/unit/security/validator.t.cpp b/tests/unit/security/validator.t.cpp
index faecf56..adf72d3 100644
--- a/tests/unit/security/validator.t.cpp
+++ b/tests/unit/security/validator.t.cpp
@@ -198,7 +198,7 @@
 {
 public:
   void
-  checkPolicy(const Data& data, const shared_ptr<ValidationState>& state,
+  checkPolicy(const Data&, const shared_ptr<ValidationState>& state,
               const ValidationContinuation& continueValidation) override
   {
     continueValidation(nullptr, state);
@@ -264,28 +264,8 @@
     // create another key for the same identity and sign it properly
     Key parentKey = m_keyChain.createKey(subIdentity);
     Key requestedKey = subIdentity.getKey(interest.getName());
-
-    Name certificateName = requestedKey.getName();
-    certificateName
-    .append("looper")
-    .appendVersion();
-    v2::Certificate certificate;
-    certificate.setName(certificateName);
-
-    // set metainfo
-    certificate.setContentType(tlv::ContentType_Key);
-    certificate.setFreshnessPeriod(1_h);
-
-    // set content
-    certificate.setContent(requestedKey.getPublicKey().data(), requestedKey.getPublicKey().size());
-
-    // set signature-info
-    SignatureInfo info;
-    info.setValidityPeriod(security::ValidityPeriod(time::system_clock::now() - 10_days,
-                                                    time::system_clock::now() + 10_days));
-
-    m_keyChain.sign(certificate, signingByKey(parentKey).setSignatureInfo(info));
-    face.receive(certificate);
+    auto cert = makeCert(requestedKey, "looper", parentKey);
+    face.receive(cert);
   };
 
   Data data("/Security/ValidatorFixture/Sub1/Sub2/Data");
@@ -307,13 +287,13 @@
 
 BOOST_AUTO_TEST_CASE(LoopedCertChain)
 {
-  auto s1 = addIdentity("/loop");
+  auto s1 = m_keyChain.createIdentity("/loop");
   auto k1 = m_keyChain.createKey(s1, RsaKeyParams(name::Component("key1")));
   auto k2 = m_keyChain.createKey(s1, RsaKeyParams(name::Component("key2")));
   auto k3 = m_keyChain.createKey(s1, RsaKeyParams(name::Component("key3")));
 
   auto makeCert = [this] (Key& key, const Key& signer) {
-    v2::Certificate request = key.getDefaultCertificate();
+    Certificate request = key.getDefaultCertificate();
     request.setName(Name(key.getName()).append("looper").appendVersion());
 
     SignatureInfo info;
diff --git a/tests/unit/security/validity-period.t.cpp b/tests/unit/security/validity-period.t.cpp
index 768e774..1dc7740 100644
--- a/tests/unit/security/validity-period.t.cpp
+++ b/tests/unit/security/validity-period.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2018 Regents of the University of California.
+ * Copyright (c) 2013-2020 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -22,7 +22,7 @@
 #include "ndn-cxx/security/validity-period.hpp"
 
 #include "tests/boost-test.hpp"
-#include "tests/unit/unit-test-time-fixture.hpp"
+#include "tests/unit/clock-fixture.hpp"
 
 #include <boost/lexical_cast.hpp>
 
@@ -35,14 +35,12 @@
 BOOST_AUTO_TEST_SUITE(Security)
 BOOST_AUTO_TEST_SUITE(TestValidityPeriod)
 
-BOOST_FIXTURE_TEST_CASE(ConstructorSetter, UnitTestTimeFixture)
+BOOST_FIXTURE_TEST_CASE(ConstructorSetter, ClockFixture)
 {
-  time::system_clock::TimePoint now = this->systemClock->getNow();
-
-  time::system_clock::TimePoint notBefore = now - 1_day;
-  time::system_clock::TimePoint notAfter = notBefore + 2_days;
-
-  ValidityPeriod validity1 = ValidityPeriod(notBefore, notAfter);
+  auto now = m_systemClock->getNow();
+  auto notBefore = now - 1_day;
+  auto notAfter = notBefore + 2_days;
+  ValidityPeriod validity1(notBefore, notAfter);
 
   auto period = validity1.getPeriod();
   BOOST_CHECK_GE(period.first, notBefore); // fractional seconds will be removed
diff --git a/tests/unit/security/verification-helpers.t.cpp b/tests/unit/security/verification-helpers.t.cpp
index f1e7185..476bbe3 100644
--- a/tests/unit/security/verification-helpers.t.cpp
+++ b/tests/unit/security/verification-helpers.t.cpp
@@ -23,9 +23,8 @@
 #include "ndn-cxx/security/transform/public-key.hpp"
 // #include "ndn-cxx/util/string-helper.hpp"
 
-#include "tests/boost-test.hpp"
-#include "tests/identity-management-fixture.hpp"
-#include "tests/make-interest-data.hpp"
+#include "tests/key-chain-fixture.hpp"
+#include "tests/test-common.hpp"
 
 #include <boost/mpl/vector.hpp>
 
@@ -39,12 +38,12 @@
 BOOST_AUTO_TEST_SUITE(TestVerificationHelpers)
 
 // // Use this test case to regenerate the dataset if the signature format changes
-// BOOST_FIXTURE_TEST_CASE(Generator, IdentityManagementFixture)
+// BOOST_FIXTURE_TEST_CASE(Generator, KeyChainFixture)
 // {
-//   Identity wrongIdentity = addIdentity("/Security/TestVerificationHelpers/Wrong");
+//   Identity wrongIdentity = m_keyChain.createIdentity("/Security/TestVerificationHelpers/Wrong");
 //   std::map<std::string, SigningInfo> identities = {
-//     {"Ecdsa", signingByIdentity(addIdentity("/Security/TestVerificationHelpers/EC", EcKeyParams()))},
-//     {"Rsa", signingByIdentity(addIdentity("/Security/TestVerificationHelpers/RSA", RsaKeyParams()))},
+//     {"Ecdsa", signingByIdentity(m_keyChain.createIdentity("/Security/TestVerificationHelpers/EC", EcKeyParams()))},
+//     {"Rsa", signingByIdentity(m_keyChain.createIdentity("/Security/TestVerificationHelpers/RSA", RsaKeyParams()))},
 //     {"Sha256", signingWithSha256()}
 //   };
 
@@ -601,7 +600,7 @@
   // - pib::Key version is tested as part of key-chain.t.cpp (Security/TestKeyChain)
 }
 
-BOOST_FIXTURE_TEST_CASE(VerifyHmac, IdentityManagementFixture)
+BOOST_FIXTURE_TEST_CASE(VerifyHmac, KeyChainFixture)
 {
   const Tpm& tpm = m_keyChain.getTpm();
   Data data("/data");
