Helper for validator that uses CommandInterest + Config policy and NetworkFetcher. More...
#include <validator-config.hpp>
Public Types | |
using | Options = v2::ValidationPolicyCommandInterest::Options |
Public Member Functions | |
ValidatorConfig (std::unique_ptr< v2::CertificateFetcher > fetcher, const Options &options=Options()) | |
ValidatorConfig (Face &face, const Options &options=Options()) | |
void | load (const std::string &filename) |
void | load (const std::string &input, const std::string &filename) |
void | load (std::istream &input, const std::string &filename) |
void | load (const v2::validator_config::ConfigSection &configSection, const std::string &filename) |
Public Member Functions inherited from ndn::security::v2::Validator | |
Validator (unique_ptr< ValidationPolicy > policy, unique_ptr< CertificateFetcher > certFetcher) | |
Validator constructor. More... | |
~Validator () | |
ValidationPolicy & | getPolicy () |
CertificateFetcher & | getFetcher () |
void | setMaxDepth (size_t depth) |
Set the maximum depth of the certificate chain. More... | |
size_t | getMaxDepth () const |
void | validate (const Data &data, const DataValidationSuccessCallback &successCb, const DataValidationFailureCallback &failureCb) |
Asynchronously validate data . More... | |
void | validate (const Interest &interest, const InterestValidationSuccessCallback &successCb, const InterestValidationFailureCallback &failureCb) |
Asynchronously validate interest . More... | |
void | loadAnchor (const std::string &groupId, Certificate &&cert) |
load static trust anchor. More... | |
void | loadAnchor (const std::string &groupId, const std::string &certfilePath, time::nanoseconds refreshPeriod, bool isDir=false) |
load dynamic trust anchors. More... | |
void | resetAnchors () |
remove any previously loaded static or dynamic trust anchor More... | |
void | cacheVerifiedCertificate (Certificate &&cert) |
Cache verified cert a period of time (1 hour) More... | |
void | resetVerifiedCertificates () |
Remove any cached verified certificates. More... | |
Public Member Functions inherited from ndn::security::v2::CertificateStorage | |
CertificateStorage () | |
const Certificate * | findTrustedCert (const Interest &interestForCert) const |
Find a trusted certificate in trust anchor container or in verified cache. More... | |
bool | isCertKnown (const Name &certPrefix) const |
Check if certificate exists in verified, unverified cache, or in the set of trust anchors. More... | |
void | cacheUnverifiedCert (Certificate &&cert) |
Cache unverified certificate for a period of time (5 minutes) More... | |
const TrustAnchorContainer & | getTrustAnchors () const |
const CertificateCache & | getVerifiedCertCache () const |
const CertificateCache & | getUnverifiedCertCache () const |
Public Attributes | |
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE | __pad0__: v2::ValidationPolicyConfig& m_policyConfig |
Additional Inherited Members | |
Protected Member Functions inherited from ndn::security::v2::CertificateStorage | |
void | loadAnchor (const std::string &groupId, Certificate &&cert) |
load static trust anchor. More... | |
void | loadAnchor (const std::string &groupId, const std::string &certfilePath, time::nanoseconds refreshPeriod, bool isDir=false) |
load dynamic trust anchors. More... | |
void | resetAnchors () |
remove any previously loaded static or dynamic trust anchor More... | |
void | cacheVerifiedCert (Certificate &&cert) |
Cache verified certificate a period of time (1 hour) More... | |
void | resetVerifiedCerts () |
Remove any cached verified certificates. More... | |
Protected Attributes inherited from ndn::security::v2::CertificateStorage | |
TrustAnchorContainer | m_trustAnchors |
CertificateCache | m_verifiedCertCache |
CertificateCache | m_unverifiedCertCache |
Helper for validator that uses CommandInterest + Config policy and NetworkFetcher.
Definition at line 35 of file validator-config.hpp.
Definition at line 39 of file validator-config.hpp.
|
explicit |
Definition at line 28 of file validator-config.cpp.
|
explicit |
Definition at line 36 of file validator-config.cpp.
void ndn::security::ValidatorConfig::load | ( | const std::string & | filename | ) |
Definition at line 42 of file validator-config.cpp.
Referenced by nfd::RibManager::applyLocalhostConfig(), nfd::RibManager::applyPaConfig(), and nfd::RibManager::enableLocalhop().
void ndn::security::ValidatorConfig::load | ( | const std::string & | input, |
const std::string & | filename | ||
) |
Definition at line 48 of file validator-config.cpp.
void ndn::security::ValidatorConfig::load | ( | std::istream & | input, |
const std::string & | filename | ||
) |
Definition at line 54 of file validator-config.cpp.
void ndn::security::ValidatorConfig::load | ( | const v2::validator_config::ConfigSection & | configSection, |
const std::string & | filename | ||
) |
Definition at line 60 of file validator-config.cpp.
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE ndn::security::ValidatorConfig::__pad0__ |
Definition at line 61 of file validator-config.hpp.