diff --git a/tests/identity-management-fixture.cpp b/tests/identity-management-fixture.cpp
index 1575fa8..3bb7252 100644
--- a/tests/identity-management-fixture.cpp
+++ b/tests/identity-management-fixture.cpp
@@ -24,6 +24,8 @@
  */
 
 #include "identity-management-fixture.hpp"
+#include <ndn-cxx/util/io.hpp>
+#include <boost/filesystem.hpp>
 
 namespace nfd {
 namespace tests {
@@ -31,18 +33,23 @@
 IdentityManagementFixture::IdentityManagementFixture()
   : m_keyChain("sqlite3", "file")
 {
-  m_keyChain.getDefaultCertificate(); // side effect: creation of the default cert if doesn't exist
+  m_keyChain.getDefaultCertificate(); // side effect: create a default cert if it doesn't exist
 }
 
 IdentityManagementFixture::~IdentityManagementFixture()
 {
-  for (auto&& id : m_identities) {
+  for (const auto& id : m_identities) {
     m_keyChain.deleteIdentity(id);
   }
+
+  boost::system::error_code ec;
+  for (const auto& certFile : m_certFiles) {
+    boost::filesystem::remove(certFile, ec); // ignore error
+  }
 }
 
 bool
-IdentityManagementFixture::addIdentity(const ndn::Name& identity, const ndn::KeyParams& params)
+IdentityManagementFixture::addIdentity(const Name& identity, const ndn::KeyParams& params)
 {
   try {
     m_keyChain.createIdentity(identity, params);
@@ -54,5 +61,29 @@
   }
 }
 
+bool
+IdentityManagementFixture::saveIdentityCertificate(const Name& identity, const std::string& filename, bool wantAdd)
+{
+  shared_ptr<ndn::IdentityCertificate> cert;
+  try {
+    cert = m_keyChain.getCertificate(m_keyChain.getDefaultCertificateNameForIdentity(identity));
+  }
+  catch (const ndn::SecPublicInfo::Error&) {
+    if (wantAdd && this->addIdentity(identity)) {
+      return this->saveIdentityCertificate(identity, filename, false);
+    }
+    return false;
+  }
+
+  m_certFiles.push_back(filename);
+  try {
+    ndn::io::save(*cert, filename);
+    return true;
+  }
+  catch (const ndn::io::Error&) {
+    return false;
+  }
+}
+
 } // namespace tests
 } // namespace nfd
