ndn::security::v2::validator_config::RegexChecker Class Reference

#include <checker.hpp>

+ Inheritance diagram for ndn::security::v2::validator_config::RegexChecker:
+ Collaboration diagram for ndn::security::v2::validator_config::RegexChecker:

Public Member Functions

 RegexChecker (const Regex &regex)
 
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. More...
 

Static Public Member Functions

static unique_ptr< Checkercreate (const ConfigSection &configSection, const std::string &configFilename)
 create a checker from configuration section More...
 

Protected Member Functions

bool checkNames (const Name &pktName, const Name &klName, const shared_ptr< ValidationState > &state) override
 

Detailed Description

Definition at line 100 of file checker.hpp.

Constructor & Destructor Documentation

ndn::security::v2::validator_config::RegexChecker::RegexChecker ( const Regex regex)
explicit

Definition at line 75 of file checker.cpp.

Member Function Documentation

bool ndn::security::v2::validator_config::Checker::check ( uint32_t  pktType,
const Name pktName,
const Name klName,
const shared_ptr< ValidationState > &  state 
)
inherited

Check if packet name ane KeyLocator satisfy the checker's conditions.

Parameters
pktTypetlv::Interest or tlv::Data
pktNamepacket's name
klNameKeyLocator's name
stateValidation state
Return values
falsedata is immediately invalid. Will call state::fail() with proper code and message.
truefurther signature verification is needed.

Definition at line 38 of file checker.cpp.

bool ndn::security::v2::validator_config::RegexChecker::checkNames ( const Name pktName,
const Name klName,
const shared_ptr< ValidationState > &  state 
)
overrideprotectedvirtual

Implements ndn::security::v2::validator_config::Checker.

Definition at line 81 of file checker.cpp.

unique_ptr< Checker > ndn::security::v2::validator_config::Checker::create ( const ConfigSection configSection,
const std::string &  configFilename 
)
staticinherited

create a checker from configuration section

Parameters
configSectionThe section containing the definition of checker.
configFilenameThe configuration file name.
Returns
a checker created from configuration

Definition at line 126 of file checker.cpp.