|
NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
|
API Documentation
|
Go to the documentation of this file.
38 : m_certsByTime(m_certs.
get<0>())
39 , m_certsByName(m_certs.
get<1>())
40 , m_maxLifetime(maxLifetime)
49 if (notAfterTime < now) {
56 << time::duration_cast<time::seconds>(removalTime - now));
57 m_certs.insert(Entry(cert, removalTime));
70 if (certPrefix.
size() > 0 && certPrefix[-1].isImplicitSha256Digest()) {
71 NDN_LOG_INFO(
"Certificate search using name with the implicit digest is not yet supported");
73 auto itr = m_certsByName.lower_bound(certPrefix);
74 if (itr == m_certsByName.end() || !certPrefix.
isPrefixOf(itr->getCertName()))
82 if (interest.
getName().
size() > 0 && interest.
getName()[-1].isImplicitSha256Digest()) {
83 NDN_LOG_INFO(
"Certificate search using name with implicit digest is not yet supported");
87 for (
auto i = m_certsByName.lower_bound(interest.
getName());
90 const auto& cert = i->cert;
99 CertificateCache::refresh()
103 auto cIt = m_certsByTime.begin();
104 while (cIt != m_certsByTime.end() && cIt->removalTime < now) {
105 m_certsByTime.erase(cIt);
106 cIt = m_certsByTime.begin();
#define NDN_LOG_INIT(name)
declare a log module
R & get(variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > &v, nonstd_lite_in_place_type_t(R)=nonstd_lite_in_place_type(R))
bool isPrefixOf(const Name &other) const
Check if this name is a prefix of another name.
#define NDN_LOG_INFO(expression)
size_t size() const
Returns the number of components.
void clear()
Remove all certificates from cache.
static time_point now() noexcept
std::pair< time::system_clock::TimePoint, time::system_clock::TimePoint > getPeriod() const
Get the stored validity period.
const Name & getName() const
Get name.
static time::nanoseconds getDefaultLifetime()
CertificateCache(const time::nanoseconds &maxLifetime=getDefaultLifetime())
Create an object for certificate cache.
Represents a container for verified certificates.
void insert(const Certificate &cert)
Insert certificate into cache.
Represents an absolute name.
The certificate following the certificate format naming convention.
std::string toIsoString(const system_clock::TimePoint &timePoint)
Convert to the ISO string representation of the time (YYYYMMDDTHHMMSS,fffffffff)
ValidityPeriod getValidityPeriod() const
Get validity period of the certificate.
Represents an Interest packet.
bool matchesData(const Data &data) const
Check if Interest can be satisfied by data.
#define NDN_LOG_DEBUG(expression)
const Certificate * find(const Name &certPrefix) const
Get certificate given key name.
const Name & getName() const noexcept
Copyright (c) 2011-2015 Regents of the University of California.