diff --git a/src/security/v2/certificate-cache.hpp b/src/security/v2/certificate-cache.hpp
new file mode 100644
index 0000000..4bf9f3c
--- /dev/null
+++ b/src/security/v2/certificate-cache.hpp
@@ -0,0 +1,144 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2013-2017 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.
+ */
+
+#ifndef NDN_SECURITY_V2_CERTIFICATE_CACHE_HPP
+#define NDN_SECURITY_V2_CERTIFICATE_CACHE_HPP
+
+#include "../../interest.hpp"
+#include "certificate.hpp"
+
+#include <boost/multi_index_container.hpp>
+#include <boost/multi_index/ordered_index.hpp>
+#include <boost/multi_index/mem_fun.hpp>
+#include <boost/multi_index/member.hpp>
+
+namespace ndn {
+namespace security {
+namespace v2 {
+
+/**
+ * @brief Represents a container for verified certificates.
+ *
+ * A certificate is removed no later than its NotAfter time, or maxLifetime after it has been
+ * added to the cache.
+ */
+class CertificateCache : noncopyable
+{
+public:
+  /**
+   * @brief Create an object for certificate cache.
+   *
+   * @param maxLifetime the maximum time that certificates could live inside cache (default: 1 hour)
+   */
+  explicit
+  CertificateCache(const time::nanoseconds& maxLifetime = getDefaultLifetime());
+
+  /**
+   * @brief Insert certificate into cache.
+   *
+   * The inserted certificate will be removed no later than its NotAfter time, or maxLifetime
+   * defined during cache construction.
+   *
+   * @param cert  the certificate packet.
+   */
+  void
+  insert(const Certificate& cert);
+
+  /**
+   * @brief Get certificate given key name
+   * @param keyName  Key name for searching the certificate.
+   * @return The found certificate, nullptr if not found.
+   *
+   * @note The returned value may be invalidated after next call to one of find methods.
+   */
+  const Certificate*
+  find(const Name& keyName);
+
+  /**
+   * @brief Find certificate given interest
+   * @param interest  The input interest packet.
+   * @return The found certificate that matches the interest, nullptr if not found.
+   *
+   * @note ChildSelector is not supported.
+   *
+   * @note The returned value may be invalidated after next call to one of find methods.
+   */
+  const Certificate*
+  find(const Interest& interest);
+
+private:
+  class Entry
+  {
+  public:
+    Entry(const Certificate& cert, const time::system_clock::TimePoint& removalTime)
+      : cert(cert)
+      , removalTime(removalTime)
+    {
+    }
+
+    const Name&
+    getCertName() const
+    {
+      return cert.getName();
+    }
+
+  public:
+    Certificate cert;
+    time::system_clock::TimePoint removalTime;
+  };
+
+  /**
+   * @brief Remove all outdated certificate entries.
+   */
+  void
+  refresh();
+
+public:
+  static const time::nanoseconds&
+  getDefaultLifetime();
+
+private:
+  /// @todo Switch to InMemoryStorateTimeout after it is available (task #3917)
+  typedef boost::multi_index::multi_index_container<
+    Entry,
+    boost::multi_index::indexed_by<
+      boost::multi_index::ordered_non_unique<
+        boost::multi_index::member<Entry, const time::system_clock::TimePoint, &Entry::removalTime>
+      >,
+      boost::multi_index::ordered_unique<
+        boost::multi_index::const_mem_fun<Entry, const Name&, &Entry::getCertName>
+      >
+    >
+  > CertIndex;
+
+  typedef CertIndex::nth_index<0>::type CertIndexByTime;
+  typedef CertIndex::nth_index<1>::type CertIndexByName;
+  CertIndex m_certs;
+  CertIndexByTime& m_certsByTime;
+  CertIndexByName& m_certsByName;
+  time::nanoseconds m_maxLifetime;
+};
+
+} // namespace v2
+} // namespace security
+} // namespace ndn
+
+#endif // NDN_SECURITY_V2_CERTIFICATE_CACHE_HPP
