22 #ifndef NDN_CXX_SECURITY_VALIDATION_POLICY_CONFIG_HPP
23 #define NDN_CXX_SECURITY_VALIDATION_POLICY_CONFIG_HPP
29 namespace validator_config {
48 load(
const std::string& filename);
55 load(
const std::string& input,
const std::string& filename);
62 load(std::istream& input,
const std::string& filename);
82 processConfigTrustAnchor(
const ConfigSection& section,
const std::string& filename);
85 getRefreshPeriod(ConfigSection::const_iterator& it,
const ConfigSection::const_iterator& end);
88 getDefaultRefreshPeriod();
96 bool m_shouldBypass =
false;
97 bool m_isConfigured =
false;
99 std::vector<unique_ptr<Rule>> m_dataRules;
100 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
Contains the ndn-cxx security framework.
::boost::chrono::nanoseconds nanoseconds