diff --git a/tests/unit-tests/security/identity-fixture.cpp b/tests/unit-tests/security/identity-fixture.cpp
index 31bd3a2..04589bc 100644
--- a/tests/unit-tests/security/identity-fixture.cpp
+++ b/tests/unit-tests/security/identity-fixture.cpp
@@ -24,19 +24,23 @@
 #include "boost-test.hpp"
 
 namespace ndn {
-
-// OSX KeyChain, when used on a headless server,
-// forbids usage of a private key if that key isn't created by the calling process.
-// Therefore, unit testing must create its own key pair.
+namespace security {
 
 class IdentityFixture
 {
 public:
   IdentityFixture()
   {
+    // initialize KeyChain from TEST_HOME
+    if (std::getenv("TEST_HOME"))
+      m_HOME = std::getenv("TEST_HOME");
+    setenv("TEST_HOME", "tests/unit-tests/security/config-file-home", 1);
+
+    KeyChain keyChain("sqlite3", "file");
+
     // save the old default identity
     try {
-      m_oldDefaultIdentity = m_keyChain.getDefaultIdentity();
+      m_oldDefaultIdentity = keyChain.getDefaultIdentity();
       m_hasOldDefaultIdentity = true;
     }
     catch (SecPublicInfo::Error& e) {
@@ -47,28 +51,36 @@
     m_newIdentity.appendVersion();
 
     // create the new identity and self-signed certificate
-    m_keyChain.createIdentity(m_newIdentity);
+    keyChain.createIdentity(m_newIdentity);
 
     // set the new identity as default identity,
     // and the corresponding certificate becomes the default certificate
-    m_keyChain.setDefaultIdentity(m_newIdentity);
+    keyChain.setDefaultIdentity(m_newIdentity);
   }
 
   ~IdentityFixture()
   {
+    KeyChain keyChain("sqlite3", "file");
+
     // recover the old default setting
     if (m_hasOldDefaultIdentity) {
-      m_keyChain.setDefaultIdentity(m_oldDefaultIdentity);
+      keyChain.setDefaultIdentity(m_oldDefaultIdentity);
     }
 
     // remove the temporarily created identity and certificates
     // XXX This has no effect if oldDefaultIdentity doesn't exist.
     //     newIdentity would be kept as default.
-    m_keyChain.deleteIdentity(m_newIdentity);
+    keyChain.deleteIdentity(m_newIdentity);
+
+    if (!m_HOME.empty())
+      setenv("TEST_HOME", m_HOME.c_str(), 1);
+    else
+      unsetenv("TEST_HOME");
   }
 
 private:
-  KeyChain m_keyChain;
+  std::string m_HOME;
+
   bool m_hasOldDefaultIdentity;
   Name m_oldDefaultIdentity;
   Name m_newIdentity;
@@ -76,4 +88,5 @@
 
 BOOST_GLOBAL_FIXTURE(IdentityFixture)
 
+} // namespace security
 } // namespace ndn
