NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
ndn::security::ValidatorConfig Class Reference

Helper for validator that uses CommandInterest + Config policy and NetworkFetcher. More...

#include <validator-config.hpp>

Inheritance diagram for ndn::security::ValidatorConfig:
Collaboration diagram for ndn::security::ValidatorConfig:

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 ()
 
ValidationPolicygetPolicy ()
 
CertificateFetchergetFetcher ()
 
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 CertificatefindTrustedCert (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 TrustAnchorContainergetTrustAnchors () const
 
const CertificateCachegetVerifiedCertCache () const
 
const CertificateCachegetUnverifiedCertCache () 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
 

Detailed Description

Helper for validator that uses CommandInterest + Config policy and NetworkFetcher.

Definition at line 35 of file validator-config.hpp.

Member Typedef Documentation

◆ Options

Constructor & Destructor Documentation

◆ ValidatorConfig() [1/2]

ndn::security::ValidatorConfig::ValidatorConfig ( std::unique_ptr< v2::CertificateFetcher fetcher,
const Options options = Options() 
)
explicit

Definition at line 28 of file validator-config.cpp.

◆ ValidatorConfig() [2/2]

ndn::security::ValidatorConfig::ValidatorConfig ( Face face,
const Options options = Options() 
)
explicit

Definition at line 36 of file validator-config.cpp.

Member Function Documentation

◆ load() [1/4]

void ndn::security::ValidatorConfig::load ( const std::string &  filename)

Definition at line 42 of file validator-config.cpp.

◆ load() [2/4]

void ndn::security::ValidatorConfig::load ( const std::string &  input,
const std::string &  filename 
)

Definition at line 48 of file validator-config.cpp.

◆ load() [3/4]

void ndn::security::ValidatorConfig::load ( std::istream &  input,
const std::string &  filename 
)

Definition at line 54 of file validator-config.cpp.

◆ load() [4/4]

void ndn::security::ValidatorConfig::load ( const v2::validator_config::ConfigSection configSection,
const std::string &  filename 
)

Definition at line 60 of file validator-config.cpp.

Member Data Documentation

◆ __pad0__

NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE ndn::security::ValidatorConfig::__pad0__

Definition at line 62 of file validator-config.hpp.


The documentation for this class was generated from the following files: