NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
ndn::security::conf::CustomizedChecker Class Reference

#include <checker.hpp>

Inheritance diagram for ndn::security::conf::CustomizedChecker:
Collaboration diagram for ndn::security::conf::CustomizedChecker:

Public Member Functions

 CustomizedChecker (uint32_t sigType, shared_ptr< KeyLocatorChecker > keyLocatorChecker)
 
virtual int8_t check (const Data &data, const OnDataChecked &onValidated, const OnDataCheckFailed &onValidationFailed)
 check if data satisfies condition defined in the specific checker implementation More...
 
virtual int8_t check (const Interest &interest, const OnInterestChecked &onValidated, const OnInterestCheckFailed &onValidationFailed)
 check if interest satisfies condition defined in the specific checker implementation More...
 
- Public Member Functions inherited from ndn::security::conf::Checker
virtual ~Checker ()
 

Additional Inherited Members

- Public Types inherited from ndn::security::conf::Checker
enum  { INTEREST_SIG_VALUE = -1, INTEREST_SIG_INFO = -2 }
 
typedef function< void(const shared_ptr< const Interest > &)> OnInterestChecked
 
typedef function< void(const shared_ptr< const Interest > &, const std::string &)> OnInterestCheckFailed
 
typedef function< void(const shared_ptr< const Data > &)> OnDataChecked
 
typedef function< void(const shared_ptr< const Data > &, const std::string &)> OnDataCheckFailed
 

Detailed Description

Definition at line 93 of file checker.hpp.

Constructor & Destructor Documentation

ndn::security::conf::CustomizedChecker::CustomizedChecker ( uint32_t  sigType,
shared_ptr< KeyLocatorChecker keyLocatorChecker 
)
inline

Member Function Documentation

virtual int8_t ndn::security::conf::CustomizedChecker::check ( const Data data,
const OnDataChecked onValidated,
const OnDataCheckFailed onValidationFailed 
)
inlinevirtual

check if data satisfies condition defined in the specific checker implementation

Parameters
dataData packet
onValidatedCallback function which is called when data is immediately valid
onValidationFailedCall function which is called when data is immediately invalid
Returns
-1 if data is immediately invalid (onValidationFailed has been called) 1 if data is immediately valid (onValidated has been called) 0 if further signature verification is needed.

Implements ndn::security::conf::Checker.

Definition at line 119 of file checker.hpp.

References ndn::security::conf::Checker::check(), and ndn::Data::getSignature().

virtual int8_t ndn::security::conf::CustomizedChecker::check ( const Interest interest,
const OnInterestChecked onValidated,
const OnInterestCheckFailed onValidationFailed 
)
inlinevirtual

check if interest satisfies condition defined in the specific checker implementation

Parameters
interestInterest packet
onValidatedCallback function which is called when interest is immediately valid
onValidationFailedCall function which is called when interest is immediately invalid
Returns
-1 if interest is immediately invalid (onValidationFailed has been called) 1 if interest is immediately valid (onValidated has been called) 0 if further signature verification is needed.

Implements ndn::security::conf::Checker.

Definition at line 127 of file checker.hpp.

References ndn::security::conf::Checker::check(), ndn::tlv::DigestSha256, ndn::Signature::getKeyLocator(), ndn::Interest::getName(), ndn::Signature::getType(), ndn::Signature::hasKeyLocator(), ndn::security::conf::Checker::INTEREST_SIG_INFO, ndn::security::conf::Checker::INTEREST_SIG_VALUE, ndn::tlv::SignatureSha256WithEcdsa, and ndn::tlv::SignatureSha256WithRsa.


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