diff --git a/src/ca-detail/ca-memory.cpp b/src/ca-detail/ca-memory.cpp
index 14a6f87..566e08c 100644
--- a/src/ca-detail/ca-memory.cpp
+++ b/src/ca-detail/ca-memory.cpp
@@ -80,6 +80,28 @@
   }
 }
 
+std::list<CertificateRequest>
+CaMemory::listAllRequests()
+{
+  std::list<CertificateRequest> result;
+  for (const auto& entry : m_requests) {
+    result.push_back(entry.second);
+  }
+  return result;
+}
+
+std::list<CertificateRequest>
+CaMemory::listAllRequests(const Name& caName)
+{
+  std::list<CertificateRequest> result;
+  for (const auto& entry : m_requests) {
+    if (entry.second.getCaName() == caName) {
+      result.push_back(entry.second);
+    }
+  }
+  return result;
+}
+
 // certificate related
 security::v2::Certificate
 CaMemory::getCertificate(const std::string& certId)
@@ -122,5 +144,27 @@
   }
 }
 
+std::list<security::v2::Certificate>
+CaMemory::listAllIssuedCertificates()
+{
+  std::list<security::v2::Certificate> result;
+  for (const auto& entry : m_issuedCerts) {
+    result.push_back(entry.second);
+  }
+  return result;
+}
+
+std::list<security::v2::Certificate>
+CaMemory::listAllIssuedCertificates(const Name& caName)
+{
+  std::list<security::v2::Certificate> result;
+  for (const auto& entry : m_issuedCerts) {
+    if (entry.second.getSignature().getKeyLocator().getName().getPrefix(-2) == caName) {
+      result.push_back(entry.second);
+    }
+  }
+  return result;
+}
+
 } // namespace ndncert
 } // namespace ndn
diff --git a/src/ca-detail/ca-memory.hpp b/src/ca-detail/ca-memory.hpp
index 249321d..d695359 100644
--- a/src/ca-detail/ca-memory.hpp
+++ b/src/ca-detail/ca-memory.hpp
@@ -45,6 +45,12 @@
   void
   deleteRequest(const std::string& requestId) override;
 
+  std::list<CertificateRequest>
+  listAllRequests() override;
+
+  std::list<CertificateRequest>
+  listAllRequests(const Name& caName) override;
+
   // certificate related
   security::v2::Certificate
   getCertificate(const std::string& certId) override;
@@ -58,6 +64,12 @@
   void
   deleteCertificate(const std::string& certId) override;
 
+  std::list<security::v2::Certificate>
+  listAllIssuedCertificates() override;
+
+  std::list<security::v2::Certificate>
+  listAllIssuedCertificates(const Name& caName) override;
+
 private:
   std::map<std::string, CertificateRequest> m_requests;
   std::map<std::string, security::v2::Certificate> m_issuedCerts;
diff --git a/src/ca-detail/ca-sqlite.cpp b/src/ca-detail/ca-sqlite.cpp
index 46249dc..34f5d19 100644
--- a/src/ca-detail/ca-sqlite.cpp
+++ b/src/ca-detail/ca-sqlite.cpp
@@ -72,11 +72,6 @@
   if (!location.empty()) {
     dbDir = boost::filesystem::path(location);
   }
-#ifdef HAVE_TESTS
-  else if (getenv("TEST_HOME") != nullptr) {
-    dbDir = boost::filesystem::path(getenv("TEST_HOME")) / ".ndn";
-  }
-#endif // HAVE_TESTS
   else if (getenv("HOME") != nullptr) {
     dbDir = boost::filesystem::path(getenv("HOME")) / ".ndn";
   }
@@ -186,11 +181,50 @@
   }
 }
 
+std::list<CertificateRequest>
+CaSqlite::listAllRequests()
+{
+  std::list<CertificateRequest> result;
+  Sqlite3Statement statement(m_database, R"_SQLTEXT_(SELECT * FROM CertRequests)_SQLTEXT_");
+
+  while(statement.step() == SQLITE_ROW) {
+    std::string requestId = statement.getString(1);
+    Name caName(statement.getBlock(2));
+    std::string status = statement.getString(3);
+    security::v2::Certificate cert(statement.getBlock(5));
+    std::string challengeType = statement.getString(6);
+    std::string challengeSecrets = statement.getString(7);
+    CertificateRequest entry(caName, requestId, status, challengeType, challengeSecrets, cert);
+    result.push_back(entry);
+  }
+  return result;
+}
+
+std::list<CertificateRequest>
+CaSqlite::listAllRequests(const Name& caName)
+{
+  std::list<CertificateRequest> result;
+  Sqlite3Statement statement(m_database,
+                             R"_SQLTEXT_(SELECT * FROM CertRequests WHERE ca_name = ?)_SQLTEXT_");
+  statement.bind(1, caName.wireEncode(), SQLITE_TRANSIENT);
+
+  while(statement.step() == SQLITE_ROW) {
+    std::string requestId = statement.getString(1);
+    std::string status = statement.getString(3);
+    security::v2::Certificate cert(statement.getBlock(5));
+    std::string challengeType = statement.getString(6);
+    std::string challengeSecrets = statement.getString(7);
+    CertificateRequest entry(caName, requestId, status, challengeType, challengeSecrets, cert);
+    result.push_back(entry);
+  }
+  return result;
+}
+
 void
 CaSqlite::deleteRequest(const std::string& requestId)
 {
   Sqlite3Statement statement(m_database,
-                             R"_SQLTEXT_(DELETE FROM CertRequest WHERE request_id = ?)_SQLTEXT_");
+                             R"_SQLTEXT_(DELETE FROM CertRequests WHERE request_id = ?)_SQLTEXT_");
   statement.bind(1, requestId, SQLITE_TRANSIENT);
   statement.step();
 }
@@ -248,6 +282,32 @@
   statement.step();
 }
 
+std::list<security::v2::Certificate>
+CaSqlite::listAllIssuedCertificates()
+{
+  std::list<security::v2::Certificate> result;
+  Sqlite3Statement statement(m_database, R"_SQLTEXT_(SELECT * FROM IssuedCerts)_SQLTEXT_");
+
+  while (statement.step() == SQLITE_ROW) {
+    security::v2::Certificate cert(statement.getBlock(3));
+    result.push_back(cert);
+  }
+  return result;
+}
+
+std::list<security::v2::Certificate>
+CaSqlite::listAllIssuedCertificates(const Name& caName)
+{
+  auto allCerts = listAllIssuedCertificates();
+  std::list<security::v2::Certificate> result;
+  for (const auto& entry : allCerts) {
+    if (entry.getSignature().getKeyLocator().getName().getPrefix(-2) == caName) {
+      result.push_back(entry);
+    }
+  }
+  return result;
+}
+
 std::string
 CaSqlite::convertJson2String(const JsonSection& json)
 {
diff --git a/src/ca-detail/ca-sqlite.hpp b/src/ca-detail/ca-sqlite.hpp
index d31f895..6249db5 100644
--- a/src/ca-detail/ca-sqlite.hpp
+++ b/src/ca-detail/ca-sqlite.hpp
@@ -53,6 +53,12 @@
   void
   deleteRequest(const std::string& requestId) override;
 
+  std::list<CertificateRequest>
+  listAllRequests() override;
+
+  std::list<CertificateRequest>
+  listAllRequests(const Name& caName) override;
+
   // certificate related
   security::v2::Certificate
   getCertificate(const std::string& certId) override;
@@ -66,7 +72,13 @@
   void
   deleteCertificate(const std::string& certId) override;
 
-private:
+  std::list<security::v2::Certificate>
+  listAllIssuedCertificates() override;
+
+  std::list<security::v2::Certificate>
+  listAllIssuedCertificates(const Name& caName) override;
+
+PUBLIC_WITH_TESTS_ELSE_PRIVATE:
   static std::string
   convertJson2String(const JsonSection& json);
 
diff --git a/src/ca-storage.hpp b/src/ca-storage.hpp
index f06e70c..0a85f6c 100644
--- a/src/ca-storage.hpp
+++ b/src/ca-storage.hpp
@@ -52,6 +52,12 @@
   virtual void
   deleteRequest(const std::string& requestId) = 0;
 
+  virtual std::list<CertificateRequest>
+  listAllRequests() = 0;
+
+  virtual std::list<CertificateRequest>
+  listAllRequests(const Name& caName) = 0;
+
   // certificate related
   virtual security::v2::Certificate
   getCertificate(const std::string& certId) = 0;
@@ -65,6 +71,12 @@
   virtual void
   deleteCertificate(const std::string& certId) = 0;
 
+  virtual std::list<security::v2::Certificate>
+  listAllIssuedCertificates() = 0;
+
+  virtual std::list<security::v2::Certificate>
+  listAllIssuedCertificates(const Name& caName) = 0;
+
 public:
   template<class CaStorageType>
   static void
