A ConfigChecker is an abstract base class for ConfigNameRelationChecker, etc.
More...
#include <config-checker.hpp>
A ConfigChecker is an abstract base class for ConfigNameRelationChecker, etc.
used by ValidatorConfig to check if a packet name and KeyLocator satisfy the conditions in a configuration section.
| bool ndn::ConfigChecker::check |
( |
bool |
isForInterest, |
|
|
const Name & |
packetName, |
|
|
const Name & |
keyLocatorName, |
|
|
const ptr_lib::shared_ptr< ValidationState > & |
state |
|
) |
| |
Check if the packet name ane KeyLocator name satisfy this checker's conditions.
- Parameters
-
| isForInterest | True if packetName is for an Interest, false if for a Data packet. |
| packetName | The packet name. For a signed interest, the last two components are skipped but not removed. |
| keyLocatorName | The KeyLocator's name. |
| state | This calls state.fail() if the packet is invalid. |
- Returns
- True if further signature verification is needed, or false if the packet is immediately determined to be invalid in which case this calls state.fail() with the proper code and message.
| virtual bool ndn::ConfigChecker::checkNames |
( |
const Name & |
packetName, |
|
|
const Name & |
keyLocatorName, |
|
|
const ptr_lib::shared_ptr< ValidationState > & |
state |
|
) |
| |
|
protectedpure virtual |
Check if the packet name ane KeyLocator name satisfy this checker's conditions.
- Parameters
-
| packetName | The packet name, which is already stripped of signature components if this is a signed Interest name. |
| keyLocatorName | The KeyLocator's name. |
| state | This calls state.fail() if the packet is invalid. |
- Returns
- True if further signature verification is needed, or false if the packet is immediately determined to be invalid in which case this calls state.fail() with the proper code and message.
Implemented in ndn::ConfigHyperRelationChecker, ndn::ConfigRegexChecker, and ndn::ConfigNameRelationChecker.
Create a checker from the configuration section.
- Parameters
-
| configSection | The section containing the definition of the checker, e.g. one of <validation.rule.checker>. |
- Returns
- A new checker created from the configuration section.
The documentation for this class was generated from the following file: