A CertificateCacheV2 holds other user's verified certificates in security v2 format CertificateV2.
More...
#include <certificate-cache-v2.hpp>
A CertificateCacheV2 holds other user's verified certificates in security v2 format CertificateV2.
A certificate is removed no later than its NotAfter time, or maxLifetime after it has been added to the cache.
Create a CertificateCacheV2.
- Parameters
-
| maxLifetimeMilliseconds | (optional) The maximum time that certificates can live inside the cache, in milliseconds. If omitted, use getDefaultLifetime(). |
| void ndn::CertificateCacheV2::deleteCertificate |
( |
const Name & |
certificateName | ) |
|
Remove the certificate whose name equals the given name.
If no such certificate is in the cache, do nothing.
- Parameters
-
| certificateName | The name of the certificate. |
| ptr_lib::shared_ptr< CertificateV2 > ndn::CertificateCacheV2::find |
( |
const Name & |
certificatePrefix | ) |
const |
Find the certificate by the given key name.
- Parameters
-
| certificatePrefix | The certificate prefix for searching for the certificate. |
- Returns
- The found certificate, or null if not found. You must not modify the returned object. If you need to modify it, then make a copy.
Find the certificate by the given interest.
- Parameters
-
| interest | The input interest object. |
- Returns
- The found certificate which matches the interest, or null if not found. You must not modify the returned object. If you need to modify it, then make a copy.
- Note
- ChildSelector is not supported.
| static Milliseconds ndn::CertificateCacheV2::getDefaultLifetime |
( |
| ) |
|
|
inlinestatic |
Get the default maximum lifetime (1 hour).
- Returns
- The lifetime in milliseconds.
| void ndn::CertificateCacheV2::insert |
( |
const CertificateV2 & |
certificate | ) |
|
Insert the certificate into the cache.
The inserted certificate will be removed no later than its NotAfter time, or maxLifetimeMilliseconds given to the constructor.
- Parameters
-
| certificate | The certificate object, which is copied. |
| void ndn::CertificateCacheV2::setNowOffsetMilliseconds_ |
( |
Milliseconds |
nowOffsetMilliseconds | ) |
|
|
inline |
Set the offset when insert() and refresh() get the current time, which should only be used for testing.
- Parameters
-
| nowOffsetMilliseconds | The offset in milliseconds. |
The documentation for this class was generated from the following files: