22 #ifndef NDN_SECURITY_V2_VALIDATOR_HPP 23 #define NDN_SECURITY_V2_VALIDATOR_HPP 70 Validator(unique_ptr<ValidationPolicy> policy, unique_ptr<CertificateFetcher> certFetcher);
136 loadAnchor(
const std::string& groupId,
const std::string& certfilePath,
137 time::nanoseconds refreshPeriod,
bool isDir =
false);
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;
189 #endif // NDN_SECURITY_V2_VALIDATOR_HPP Copyright (c) 2011-2015 Regents of the University of California.
The certificate following the certificate format naming convention.
function< void(const Data &data)> DataValidationSuccessCallback
Callback to report a successful Data validation.
Interface used by the validator to fetch missing certificates.
void cacheVerifiedCertificate(Certificate &&cert)
Cache verified cert a period of time (1 hour)
represents an Interest packet
function< void(const Data &data, const ValidationError &error)> DataValidationFailureCallback
Callback to report a failed Data validation.
void setMaxDepth(size_t depth)
Set the maximum depth of the certificate chain.
Abstraction that implements validation policy for Data and Interest packets.
CertificateFetcher & getFetcher()
ValidationPolicy & getPolicy()
Storage for trusted anchors, verified certificate cache, and unverified certificate cache...
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.
void resetVerifiedCertificates()
Remove any cached verified certificates.
Validator(unique_ptr< ValidationPolicy > policy, unique_ptr< CertificateFetcher > certFetcher)
Validator constructor.
function< void(const Interest &interest, const ValidationError &error)> InterestValidationFailureCallback
Callback to report a failed Interest validation.
void resetAnchors()
remove any previously loaded static or dynamic trust anchor
Represents a Data packet.
function< void(const Interest &interest)> InterestValidationSuccessCallback
Callback to report a successful Interest validation.
Interface for validating data and interest packets.
size_t getMaxDepth() const