22 #ifndef NDN_SECURITY_V2_CERTIFICATE_CACHE_HPP 23 #define NDN_SECURITY_V2_CERTIFICATE_CACHE_HPP 25 #include "../../interest.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> 99 , removalTime(removalTime)
121 static const time::nanoseconds&
126 typedef 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::TimePoint, &Entry::removalTime>
132 boost::multi_index::ordered_unique<
133 boost::multi_index::const_mem_fun<Entry, const Name&, &Entry::getCertName>
138 typedef CertIndex::nth_index<0>::type CertIndexByTime;
139 typedef CertIndex::nth_index<1>::type CertIndexByName;
141 CertIndexByTime& m_certsByTime;
142 CertIndexByName& m_certsByName;
143 time::nanoseconds m_maxLifetime;
150 #endif // NDN_SECURITY_V2_CERTIFICATE_CACHE_HPP Copyright (c) 2011-2015 Regents of the University of California.
The certificate following the certificate format naming convention.
void clear()
Remove all certificates from cache.
represents an Interest packet
const Certificate * find(const Name &certPrefix) const
Get certificate given key name.
Catch-all error for security policy errors that don't fit in other categories.
Represents a container for verified certificates.
CertificateCache(const time::nanoseconds &maxLifetime=getDefaultLifetime())
Create an object for certificate cache.
Represents an absolute name.
static const time::nanoseconds & getDefaultLifetime()
const Name & getName() const
Get name.
void insert(const Certificate &cert)
Insert certificate into cache.