22 #ifndef NDN_SECURITY_VALIDATOR_CONFIG_CHECKER_HPP 23 #define NDN_SECURITY_VALIDATOR_CONFIG_CHECKER_HPP 34 class ValidationState;
36 namespace validator_config {
56 check(uint32_t pktType,
const Name& pktName,
const Name& klName,
const shared_ptr<ValidationState>& state);
65 static unique_ptr<Checker>
69 static unique_ptr<Checker>
70 createCustomizedChecker(
const ConfigSection& configSection,
const std::string& configFilename);
72 static unique_ptr<Checker>
73 createHierarchicalChecker(
const ConfigSection& configSection,
const std::string& configFilename);
75 static unique_ptr<Checker>
76 createKeyLocatorChecker(
const ConfigSection& configSection,
const std::string& configFilename);
78 static unique_ptr<Checker>
79 createKeyLocatorNameChecker(
const ConfigSection& configSection,
const std::string& configFilename);
83 checkNames(
const Name& pktName,
const Name& klName,
const shared_ptr<ValidationState>& state) = 0;
93 checkNames(
const Name& pktName,
const Name& klName,
const shared_ptr<ValidationState>& state)
override;
108 checkNames(
const Name& pktName,
const Name& klName,
const shared_ptr<ValidationState>& state)
override;
118 const std::string& klNameExpr,
const std::string klNameExpand,
123 checkNames(
const Name& pktName,
const Name& klName,
const shared_ptr<ValidationState>& state)
override;
136 #endif // NDN_SECURITY_VALIDATOR_CONFIG_CHECKER_HPP
virtual ~Checker()=default
Represents an absolute name.
boost::property_tree::ptree ConfigSection
bool check(uint32_t pktType, const Name &pktName, const Name &klName, const shared_ptr< ValidationState > &state)
Check if packet name ane KeyLocator satisfy the checker's conditions.
virtual bool checkNames(const Name &pktName, const Name &klName, const shared_ptr< ValidationState > &state)=0
static unique_ptr< Checker > create(const ConfigSection &configSection, const std::string &configFilename)
create a checker from configuration section