NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
ndn::security::v2::validator_config::Checker Class Reference

#include <checker.hpp>

Inheritance diagram for ndn::security::v2::validator_config::Checker:
Collaboration diagram for ndn::security::v2::validator_config::Checker:

Classes

class  NegativeResultBuilder
 
class  Result
 

Public Member Functions

 Checker (tlv::SignatureTypeValue sigType)
 
virtual ~Checker ()=default
 
Result check (uint32_t pktType, tlv::SignatureTypeValue sigType, const Name &pktName, const Name &klName, const ValidationState &state)
 Check if packet name and 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

virtual Result checkNames (const Name &pktName, const Name &klName)
 Base version of name checking. More...
 

Static Protected Member Functions

static Result accept ()
 
static NegativeResultBuilder reject ()
 

Protected Attributes

tlv::SignatureTypeValue m_sigType = tlv::SignatureSha256WithEcdsa
 

Detailed Description

Definition at line 38 of file checker.hpp.

Constructor & Destructor Documentation

◆ Checker()

ndn::security::v2::validator_config::Checker::Checker ( tlv::SignatureTypeValue  sigType)
explicit

Definition at line 35 of file checker.cpp.

References nonstd::optional_lite::std11::move().

◆ ~Checker()

virtual ndn::security::v2::validator_config::Checker::~Checker ( )
virtualdefault

Member Function Documentation

◆ check()

Checker::Result ndn::security::v2::validator_config::Checker::check ( uint32_t  pktType,
tlv::SignatureTypeValue  sigType,
const Name pktName,
const Name klName,
const ValidationState state 
)

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

Parameters
pktTypetlv::Interest or tlv::Data
sigTypeSignature type
pktNamepacket's name
klNameKeyLocator's name
stateValidation state

Definition at line 73 of file checker.cpp.

References checkNames(), ndn::tlv::Data, ndn::Name::getPrefix(), ndn::TagHost::getTag(), ndn::tlv::Interest, m_sigType, ndn::signed_interest::MIN_SIZE, ndn::tlv::ParametersSha256DigestComponent, reject(), ndn::Name::size(), and ndn::security::V03.

Referenced by ndn::security::v2::validator_config::Checker::Result::getErrorMessage().

◆ create()

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

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 182 of file checker.cpp.

References NDN_THROW.

Referenced by ndn::security::v2::validator_config::Rule::create(), and ndn::security::v2::validator_config::Checker::Result::getErrorMessage().

◆ checkNames()

Checker::Result ndn::security::v2::validator_config::Checker::checkNames ( const Name pktName,
const Name klName 
)
protectedvirtual

◆ accept()

◆ reject()

Member Data Documentation

◆ m_sigType

tlv::SignatureTypeValue ndn::security::v2::validator_config::Checker::m_sigType = tlv::SignatureSha256WithEcdsa
protected

Definition at line 138 of file checker.hpp.

Referenced by check().


The documentation for this class was generated from the following files: