22 #ifndef NDN_SECURITY_V2_VALIDATOR_CONFIG_CHECKER_HPP 23 #define NDN_SECURITY_V2_VALIDATOR_CONFIG_CHECKER_HPP 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_V2_VALIDATOR_CONFIG_CHECKER_HPP
Copyright (c) 2011-2015 Regents of the University of California.
virtual ~Checker()=default
NameRelationChecker(const Name &name, const NameRelation &relation)
bool checkNames(const Name &pktName, const Name &klName, const shared_ptr< ValidationState > &state) override
RegexChecker(const Regex ®ex)
bool checkNames(const Name &pktName, const Name &klName, const shared_ptr< ValidationState > &state) override
Represents an absolute name.
ndn security v2 ValidationState
boost::property_tree::ptree ConfigSection
bool checkNames(const Name &pktName, const Name &klName, const shared_ptr< ValidationState > &state) override
HyperRelationChecker(const std::string &pktNameExpr, const std::string pktNameExpand, const std::string &klNameExpr, const std::string klNameExpand, const NameRelation &hyperRelation)
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