22 #ifndef NDN_SECURITY_V2_CERTIFICATE_CACHE_HPP 23 #define NDN_SECURITY_V2_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)
119 static time::nanoseconds
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;
141 time::nanoseconds m_maxLifetime;
148 #endif // NDN_SECURITY_V2_CERTIFICATE_CACHE_HPP
The certificate following the certificate format naming convention.
const Name & getName() const
Get name.
const Certificate * find(const Name &certPrefix) const
Get certificate given key name.
void clear()
Remove all certificates from cache.
Represents an Interest packet.
static time::nanoseconds getDefaultLifetime()
Represents a container for verified certificates.
CertificateCache(const time::nanoseconds &maxLifetime=getDefaultLifetime())
Create an object for certificate cache.
Represents an absolute name.
void insert(const Certificate &cert)
Insert certificate into cache.