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>
96 , removalTime(removalTime)
126 using CertIndex = boost::multi_index::multi_index_container<
128 boost::multi_index::indexed_by<
129 boost::multi_index::ordered_non_unique<
130 boost::multi_index::member<Entry, const time::system_clock::time_point, &Entry::removalTime>
132 boost::multi_index::ordered_unique<
133 boost::multi_index::const_mem_fun<Entry, const Name&, &Entry::getCertName>
137 using CertIndexByTime = CertIndex::nth_index<0>::type;
138 using CertIndexByName = CertIndex::nth_index<1>::type;
141 CertIndexByTime& m_certsByTime;
142 CertIndexByName& m_certsByName;
const Name & getName() const noexcept
Get the Data name.
Represents an Interest packet.
Represents an absolute name.
Represents a container for verified certificates.
void insert(const Certificate &cert)
Insert certificate into cache.
const Certificate * find(const Name &certPrefix) const
Get certificate given key name.
void clear()
Remove all certificates from cache.
CertificateCache(const time::nanoseconds &maxLifetime=getDefaultLifetime())
Create an object for certificate cache.
static constexpr time::nanoseconds getDefaultLifetime() noexcept
Represents an NDN certificate.
::boost::chrono::time_point< system_clock > time_point
Contains the ndn-cxx security framework.
::boost::chrono::nanoseconds nanoseconds