22 #ifndef NDN_CXX_SECURITY_VALIDATION_POLICY_CONFIG_HPP
23 #define NDN_CXX_SECURITY_VALIDATION_POLICY_CONFIG_HPP
31 namespace validator_config {
49 load(
const std::string& filename);
56 load(
const std::string& input,
const std::string& filename);
63 load(std::istream& input,
const std::string& filename);
83 processConfigTrustAnchor(
const ConfigSection& section,
const std::string& filename);
86 getRefreshPeriod(ConfigSection::const_iterator& it,
const ConfigSection::const_iterator& end);
89 getDefaultRefreshPeriod();
97 bool m_shouldBypass =
false;
98 bool m_isConfigured =
false;
100 std::vector<unique_ptr<Rule>> m_dataRules;
101 std::vector<unique_ptr<Rule>> m_interestRules;
Represents a Data packet.
Represents an Interest packet.
Abstraction that implements validation policy for Data and Interest packets.
std::function< void(const shared_ptr< CertificateRequest > &certRequest, const shared_ptr< ValidationState > &state)> ValidationContinuation
A validator that can be set up via a configuration file.
void load(const std::string &filename)
Load policy from file filename.
void checkPolicy(const Data &data, const shared_ptr< ValidationState > &state, const ValidationContinuation &continueValidation) override
Check data against the policy.
#define NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE
boost::property_tree::ptree ConfigSection
boost::chrono::nanoseconds nanoseconds