NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
ndn::security::CertificateCacheTtl Class Reference

Cache of validated certificates with freshness-based eviction policy. More...

#include <certificate-cache-ttl.hpp>

Inheritance diagram for ndn::security::CertificateCacheTtl:
Collaboration diagram for ndn::security::CertificateCacheTtl:

Public Member Functions

 CertificateCacheTtl (boost::asio::io_service &io, const time::seconds &defaultTtl=time::seconds(3600))
virtual ~CertificateCacheTtl ()
virtual void insertCertificate (shared_ptr< const v1::IdentityCertificate > certificate)
virtual shared_ptr< const v1::IdentityCertificategetCertificate (const Name &certificateNameWithoutVersion)
virtual void reset ()
virtual size_t getSize ()
- Public Member Functions inherited from ndn::security::CertificateCache
virtual ~CertificateCache ()
bool isEmpty ()

Protected Types

typedef std::map< Name, std::pair< shared_ptr< const v1::IdentityCertificate >, EventId > > Cache

Protected Attributes

time::seconds m_defaultTtl
Cache m_cache
Scheduler m_scheduler

Detailed Description

Cache of validated certificates with freshness-based eviction policy.

Validated certificates will stay in cache for the duration of their freshness period. The lifetime of the certificate in cache can be extended by "re-inserting" it in the cache.

Definition at line 40 of file certificate-cache-ttl.hpp.

Member Typedef Documentation

◆ Cache

typedef std::map<Name, std::pair<shared_ptr<const v1::IdentityCertificate>, EventId> > ndn::security::CertificateCacheTtl::Cache

Definition at line 73 of file certificate-cache-ttl.hpp.

Constructor & Destructor Documentation

◆ CertificateCacheTtl()

ndn::security::CertificateCacheTtl::CertificateCacheTtl ( boost::asio::io_service &  io,
const time::seconds &  defaultTtl = time::seconds(3600) 

Definition at line 29 of file certificate-cache-ttl.cpp.

◆ ~CertificateCacheTtl()

ndn::security::CertificateCacheTtl::~CertificateCacheTtl ( )

Definition at line 36 of file certificate-cache-ttl.cpp.

Member Function Documentation

◆ insertCertificate()

void ndn::security::CertificateCacheTtl::insertCertificate ( shared_ptr< const v1::IdentityCertificate certificate)

◆ getCertificate()

shared_ptr< const v1::IdentityCertificate > ndn::security::CertificateCacheTtl::getCertificate ( const Name certificateNameWithoutVersion)

Implements ndn::security::CertificateCache.

Definition at line 47 of file certificate-cache-ttl.cpp.

References m_cache.

◆ reset()

void ndn::security::CertificateCacheTtl::reset ( )

◆ getSize()

Member Data Documentation

◆ m_defaultTtl

time::seconds ndn::security::CertificateCacheTtl::m_defaultTtl

Definition at line 75 of file certificate-cache-ttl.hpp.

Referenced by getSize().

◆ m_cache

Cache ndn::security::CertificateCacheTtl::m_cache

Definition at line 76 of file certificate-cache-ttl.hpp.

Referenced by getCertificate(), and getSize().

◆ m_scheduler

Scheduler ndn::security::CertificateCacheTtl::m_scheduler

Definition at line 77 of file certificate-cache-ttl.hpp.

Referenced by getSize(), insertCertificate(), and reset().

The documentation for this class was generated from the following files: