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