Represents a container for verified certificates. More...
#include <ndn-cxx/security/certificate-cache.hpp>
Inheritance diagram for ndn::security::CertificateCache:
Collaboration diagram for ndn::security::CertificateCache:Public Member Functions | |
| CertificateCache (const time::nanoseconds &maxLifetime=getDefaultLifetime()) | |
| Create an object for certificate cache. More... | |
| void | clear () |
| Remove all certificates from cache. More... | |
| const Certificate * | find (const Interest &interest) const |
| Find certificate given interest. More... | |
| const Certificate * | find (const Name &certPrefix) const |
| Get certificate given key name. More... | |
| void | insert (const Certificate &cert) |
| Insert certificate into cache. More... | |
Static Public Member Functions | |
| static constexpr time::nanoseconds | getDefaultLifetime () noexcept |
Represents a container for verified certificates.
A certificate is removed no later than its NotAfter time, or maxLifetime after it has been added to the cache.
Definition at line 41 of file certificate-cache.hpp.
|
explicit |
Create an object for certificate cache.
| maxLifetime | the maximum time that certificates could live inside cache (default: 1 hour) |
Definition at line 29 of file certificate-cache.cpp.
| void ndn::security::CertificateCache::clear | ( | ) |
Remove all certificates from cache.
Definition at line 53 of file certificate-cache.cpp.
| const Certificate * ndn::security::CertificateCache::find | ( | const Interest & | interest | ) | const |
Find certificate given interest.
| interest | The input interest packet. |
Definition at line 72 of file certificate-cache.cpp.
| const Certificate * ndn::security::CertificateCache::find | ( | const Name & | certPrefix | ) | const |
Get certificate given key name.
| certPrefix | Certificate prefix for searching the certificate. |
Definition at line 59 of file certificate-cache.cpp.
|
inlinestaticconstexprnoexcept |
Definition at line 119 of file certificate-cache.hpp.
| void ndn::security::CertificateCache::insert | ( | const Certificate & | cert | ) |
Insert certificate into cache.
The inserted certificate will be removed no later than its NotAfter time, or maxLifetime defined during cache construction.
| cert | the certificate packet. |
Definition at line 37 of file certificate-cache.cpp.