22 #ifndef NDN_CXX_SECURITY_VALIDATION_POLICY_CONFIG_HPP
23 #define NDN_CXX_SECURITY_VALIDATION_POLICY_CONFIG_HPP
31 namespace validator_config {
50 load(
const std::string& filename);
57 load(
const std::string& input,
const std::string& filename);
64 load(std::istream& input,
const std::string& filename);
84 processConfigTrustAnchor(
const ConfigSection& section,
const std::string& filename);
87 getRefreshPeriod(ConfigSection::const_iterator& it,
const ConfigSection::const_iterator& end);
90 getDefaultRefreshPeriod();
98 bool m_shouldBypass =
false;
99 bool m_isConfigured =
false;
101 std::vector<unique_ptr<Rule>> m_dataRules;
102 std::vector<unique_ptr<Rule>> m_interestRules;
Represents a Data packet.
Represents an Interest packet.
Abstraction that implements a validation policy for Interest and Data 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