22 #ifndef NDN_CXX_SECURITY_CERTIFICATE_CACHE_HPP
23 #define NDN_CXX_SECURITY_CERTIFICATE_CACHE_HPP
28 #include <boost/multi_index_container.hpp>
29 #include <boost/multi_index/ordered_index.hpp>
30 #include <boost/multi_index/mem_fun.hpp>
31 #include <boost/multi_index/member.hpp>
97 , removalTime(removalTime)
124 typedef boost::multi_index::multi_index_container<
126 boost::multi_index::indexed_by<
127 boost::multi_index::ordered_non_unique<
128 boost::multi_index::member<Entry, const time::system_clock::TimePoint, &Entry::removalTime>
130 boost::multi_index::ordered_unique<
131 boost::multi_index::const_mem_fun<Entry, const Name&, &Entry::getCertName>
136 typedef CertIndex::nth_index<0>::type CertIndexByTime;
137 typedef CertIndex::nth_index<1>::type CertIndexByName;
139 CertIndexByTime& m_certsByTime;
140 CertIndexByName& m_certsByName;
const Name & getName() const noexcept
Get name.
Represents an Interest packet.
Represents an absolute name.
Represents a container for verified certificates.
void insert(const Certificate &cert)
Insert certificate into cache.
CertificateCache(const time::nanoseconds &maxLifetime=getDefaultLifetime())
Create an object for certificate cache.
void clear()
Remove all certificates from cache.
static time::nanoseconds getDefaultLifetime()
const Certificate * find(const Name &certPrefix) const
Get certificate given key name.
Represents an NDN certificate following the version 2.0 format.
boost::chrono::nanoseconds nanoseconds