Cache of validated certificates with freshness-based eviction policy. More...
#include <certificate-cache-ttl.hpp>
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::IdentityCertificate > | getCertificate (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 |
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.
|
protected |
Definition at line 73 of file certificate-cache-ttl.hpp.
|
explicit |
Definition at line 29 of file certificate-cache-ttl.cpp.
|
virtual |
Definition at line 36 of file certificate-cache-ttl.cpp.
|
virtual |
Implements ndn::security::CertificateCache.
Definition at line 41 of file certificate-cache-ttl.cpp.
References m_scheduler, and ndn::util::scheduler::Scheduler::scheduleEvent().
|
virtual |
Implements ndn::security::CertificateCache.
Definition at line 47 of file certificate-cache-ttl.cpp.
References m_cache.
|
virtual |
Implements ndn::security::CertificateCache.
Definition at line 57 of file certificate-cache-ttl.cpp.
References m_scheduler, and ndn::util::scheduler::Scheduler::scheduleEvent().
|
virtual |
Implements ndn::security::CertificateCache.
Definition at line 63 of file certificate-cache-ttl.cpp.
References ndn::util::scheduler::Scheduler::cancelEvent(), ndn::Name::getPrefix(), m_cache, m_defaultTtl, m_scheduler, and ndn::util::scheduler::Scheduler::scheduleEvent().
|
protected |
Definition at line 75 of file certificate-cache-ttl.hpp.
Referenced by getSize().
|
protected |
Definition at line 76 of file certificate-cache-ttl.hpp.
Referenced by getCertificate(), and getSize().
|
protected |
Definition at line 77 of file certificate-cache-ttl.hpp.
Referenced by getSize(), insertCertificate(), and reset().