22 #ifndef NDN_CXX_SECURITY_VALIDATOR_HPP
23 #define NDN_CXX_SECURITY_VALIDATOR_HPP
70 Validator(unique_ptr<ValidationPolicy> policy, unique_ptr<CertificateFetcher> certFetcher);
136 loadAnchor(
const std::string& groupId,
const std::string& certfilePath,
176 requestCertificate(
const shared_ptr<CertificateRequest>& certRequest,
177 const shared_ptr<ValidationState>& state);
180 unique_ptr<ValidationPolicy> m_policy;
181 unique_ptr<CertificateFetcher> m_certFetcher;
Represents a Data packet.
Represents an Interest packet.
Interface used by the validator to fetch missing certificates.
Storage for trusted anchors, verified certificate cache, and unverified certificate cache.
Represents an NDN certificate following the version 2.0 format.
Abstraction that implements validation policy for Data and Interest packets.
Interface for validating data and interest packets.
ValidationPolicy & getPolicy()
void cacheVerifiedCertificate(Certificate &&cert)
Cache verified cert a period of time (1 hour)
void setMaxDepth(size_t depth)
Set the maximum depth of the certificate chain.
size_t getMaxDepth() const
void resetAnchors()
remove any previously loaded static or dynamic trust anchor
CertificateFetcher & getFetcher()
Validator(unique_ptr< ValidationPolicy > policy, unique_ptr< CertificateFetcher > certFetcher)
Validator constructor.
void resetVerifiedCertificates()
Remove any cached verified certificates.
void validate(const Data &data, const DataValidationSuccessCallback &successCb, const DataValidationFailureCallback &failureCb)
Asynchronously validate data.
void loadAnchor(const std::string &groupId, Certificate &&cert)
load static trust anchor.
function< void(const Interest &interest, const ValidationError &error)> InterestValidationFailureCallback
Callback to report a failed Interest validation.
function< void(const Data &data)> DataValidationSuccessCallback
Callback to report a successful Data validation.
function< void(const Data &data, const ValidationError &error)> DataValidationFailureCallback
Callback to report a failed Data validation.
function< void(const Interest &interest)> InterestValidationSuccessCallback
Callback to report a successful Interest validation.
boost::chrono::nanoseconds nanoseconds