Validator with "accept-all" policy and offline certificate fetcher.
More...
#include <ndn-cxx/security/validator-null.hpp>
Validator with "accept-all" policy and offline certificate fetcher.
Definition at line 32 of file validator-null.hpp.
◆ ValidatorNull()
ndn::security::ValidatorNull::ValidatorNull |
( |
| ) |
|
◆ cacheUnverifiedCert()
void ndn::security::CertificateStorage::cacheUnverifiedCert |
( |
Certificate && |
cert | ) |
|
|
inherited |
Cache unverified certificate for a period of time (5 minutes).
- Parameters
-
cert | The certificate packet |
- Todo:
- Add ability to customize time period
Definition at line 81 of file certificate-storage.cpp.
◆ cacheVerifiedCert()
void ndn::security::CertificateStorage::cacheVerifiedCert |
( |
Certificate && |
cert | ) |
|
|
protectedinherited |
Cache verified certificate a period of time (1 hour).
- Parameters
-
cert | The certificate packet |
- Todo:
- Add ability to customize time period
Definition at line 69 of file certificate-storage.cpp.
◆ cacheVerifiedCertificate()
void ndn::security::Validator::cacheVerifiedCertificate |
( |
Certificate && |
cert | ) |
|
|
inherited |
Cache verified cert
a period of time (1 hour).
- Todo:
- Add ability to customize time period
Definition at line 188 of file validator.cpp.
◆ findTrustedCert()
const Certificate * ndn::security::CertificateStorage::findTrustedCert |
( |
const Interest & |
interestForCert | ) |
const |
|
inherited |
Find a trusted certificate in trust anchor container or in verified cache.
- Parameters
-
- Returns
- Found certificate, nullptr if not found.
- Note
- The returned pointer may get invalidated after next findTrustedCert() or findCert() calls.
Definition at line 33 of file certificate-storage.cpp.
◆ getFetcher()
◆ getMaxDepth()
size_t ndn::security::Validator::getMaxDepth |
( |
| ) |
const |
|
inlinenoexceptinherited |
Return the maximum depth of the certificate chain.
Definition at line 89 of file validator.hpp.
◆ getPolicy()
◆ getTrustAnchors()
◆ getUnverifiedCertCache()
const CertificateCache & ndn::security::CertificateStorage::getUnverifiedCertCache |
( |
| ) |
const |
|
inherited |
◆ getVerifiedCertCache()
const CertificateCache & ndn::security::CertificateStorage::getVerifiedCertCache |
( |
| ) |
const |
|
inherited |
◆ isCertKnown()
bool ndn::security::CertificateStorage::isCertKnown |
( |
const Name & |
certPrefix | ) |
const |
|
inherited |
Check if certificate exists in the verified/unverified cache or in the set of trust anchors.
Definition at line 42 of file certificate-storage.cpp.
◆ loadAnchor() [1/2]
void ndn::security::Validator::loadAnchor |
( |
const std::string & |
groupId, |
|
|
Certificate && |
cert |
|
) |
| |
|
inherited |
Load static trust anchor.
Static trust anchors are permanently associated with the validator and never expire.
- Parameters
-
Definition at line 169 of file validator.cpp.
◆ loadAnchor() [2/2]
void ndn::security::Validator::loadAnchor |
( |
const std::string & |
groupId, |
|
|
const std::string & |
certfilePath, |
|
|
time::nanoseconds |
refreshPeriod, |
|
|
bool |
isDir = false |
|
) |
| |
|
inherited |
Load dynamic trust anchors.
Dynamic trust anchors are associated with the validator for as long as the underlying trust anchor file (set of files) exist(s).
- Parameters
-
groupId | Certificate group id, must not be empty. |
certfilePath | Specifies the path to load the trust anchors. |
refreshPeriod | Refresh period for the trust anchors, must be positive. |
isDir | Tells whether the path is a directory or a single file. |
Definition at line 175 of file validator.cpp.
◆ resetAnchors()
void ndn::security::Validator::resetAnchors |
( |
| ) |
|
|
inherited |
Remove any previously loaded static or dynamic trust anchor.
Definition at line 182 of file validator.cpp.
◆ resetVerifiedCertificates()
void ndn::security::Validator::resetVerifiedCertificates |
( |
| ) |
|
|
inherited |
Remove any cached verified certificates.
Definition at line 194 of file validator.cpp.
◆ resetVerifiedCerts()
void ndn::security::CertificateStorage::resetVerifiedCerts |
( |
| ) |
|
|
protectedinherited |
◆ setMaxDepth()
void ndn::security::Validator::setMaxDepth |
( |
size_t |
depth | ) |
|
|
inlinenoexceptinherited |
Set the maximum depth of the certificate chain.
Definition at line 98 of file validator.hpp.
◆ validate() [1/2]
Asynchronously validate data
.
- Note
successCb
and failureCb
must not be nullptr
Definition at line 47 of file validator.cpp.
◆ validate() [2/2]
Asynchronously validate interest
.
- Note
successCb
and failureCb
must not be nullptr
Definition at line 60 of file validator.cpp.
◆ m_trustAnchors
◆ m_unverifiedCertCache
◆ m_verifiedCertCache