All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ndn::ValidatorNull Class Reference

#include <validator-null.hpp>

Inheritance diagram for ndn::ValidatorNull:
[legend]
Collaboration diagram for ndn::ValidatorNull:
[legend]

Public Member Functions

virtual ~ValidatorNull ()
 
void validate (const Data &data, const OnDataValidated &onValidated, const OnDataValidationFailed &onValidationFailed)
 Validate Data and call either onValidated or onValidationFailed. More...
 
void validate (const Interest &interest, const OnInterestValidated &onValidated, const OnInterestValidationFailed &onValidationFailed)
 Validate Interest and call either onValidated or onValidationFailed. More...
 

Static Public Member Functions

static bool verifySignature (const Data &data, const PublicKey &publicKey)
 Verify the data using the publicKey. More...
 
static bool verifySignature (const Interest &interest, const PublicKey &publicKey)
 Verify the signed Interest using the publicKey. More...
 
static bool verifySignature (const Buffer &blob, const Signature &sig, const PublicKey &publicKey)
 Verify the blob using the publicKey against the signature. More...
 
static bool verifySignature (const Data &data, const SignatureSha256WithRsa &sig, const PublicKey &publicKey)
 Verify the data using the publicKey against the SHA256-RSA signature. More...
 
static bool verifySignature (const Interest &interest, const SignatureSha256WithRsa &sig, const PublicKey &publicKey)
 Verify the interest using the publicKey against the SHA256-RSA signature. More...
 
static bool verifySignature (const Buffer &blob, const SignatureSha256WithRsa &sig, const PublicKey &publicKey)
 Verify the blob using the publicKey against the SHA256-RSA signature. More...
 
static bool verifySignature (const uint8_t *buf, const size_t size, const SignatureSha256WithRsa &sig, const PublicKey &publicKey)
 Verify the blob using the publicKey against the SHA256-RSA signature. More...
 
static bool verifySignature (const Data &data, const SignatureSha256 &sig)
 Verify the data against the SHA256 signature. More...
 
static bool verifySignature (const Interest &interest, const SignatureSha256 &sig)
 Verify the interest against the SHA256 signature. More...
 
static bool verifySignature (const Buffer &blob, const SignatureSha256 &sig)
 Verify the blob against the SHA256 signature. More...
 
static bool verifySignature (const uint8_t *buf, const size_t size, const SignatureSha256 &sig)
 Verify the blob against the SHA256 signature. More...
 

Protected Member Functions

virtual void checkPolicy (const Data &data, int nSteps, const OnDataValidated &onValidated, const OnDataValidationFailed &onValidationFailed, std::vector< shared_ptr< ValidationRequest > > &nextSteps)
 Check the Data against policy and return the next validation step if necessary. More...
 
virtual void checkPolicy (const Interest &interest, int nSteps, const OnInterestValidated &onValidated, const OnInterestValidationFailed &onValidationFailed, std::vector< shared_ptr< ValidationRequest > > &nextSteps)
 Check the Interest against validation policy and return the next validation step if necessary. More...
 

Protected Attributes

bool m_hasFace
 
Facem_face
 

Detailed Description

Definition at line 16 of file validator-null.hpp.

Constructor & Destructor Documentation

virtual ndn::ValidatorNull::~ValidatorNull ( )
inlinevirtual

Definition at line 20 of file validator-null.hpp.

Member Function Documentation

virtual void ndn::ValidatorNull::checkPolicy ( const Data data,
int  nSteps,
const OnDataValidated onValidated,
const OnDataValidationFailed onValidationFailed,
std::vector< shared_ptr< ValidationRequest > > &  nextSteps 
)
inlineprotectedvirtual

Check the Data against policy and return the next validation step if necessary.

If there is no next validation step, that validation MUST have been done. i.e., either onValidated or onValidationFailed callback is invoked.

Parameters
dataThe Data to check.
nStepsThe number of validation steps that have been done.
onDataValidatedIf the Data is validated, this calls onValidated(data).
onDataValidationFailedIf validation fails, this calls onValidationFailed(data).
nextStepsOn return, contains the next validation step.

Implements ndn::Validator.

Definition at line 26 of file validator-null.hpp.

virtual void ndn::ValidatorNull::checkPolicy ( const Interest interest,
int  nSteps,
const OnInterestValidated onValidated,
const OnInterestValidationFailed onValidationFailed,
std::vector< shared_ptr< ValidationRequest > > &  nextSteps 
)
inlineprotectedvirtual

Check the Interest against validation policy and return the next validation step if necessary.

If there is no next validation step, that validation MUST have been done. i.e., either onValidated or onValidationFailed callback is invoked.

Parameters
dataThe Interest to check.
nStepsThe number of validation steps that have been done.
OnInterestValidatedIf the Interest is validated, this calls onValidated(data).
OnInterestValidationFailedIf validation fails, this calls onValidationFailed(data).
Returns
the indication of next validation step, null if there is no further step.

Implements ndn::Validator.

Definition at line 36 of file validator-null.hpp.

void ndn::Validator::validate ( const Data data,
const OnDataValidated onValidated,
const OnDataValidationFailed onValidationFailed 
)
inlineinherited

Validate Data and call either onValidated or onValidationFailed.

Parameters
dataThe Data with the signature to check.
onValidatedIf the Data is validated, this calls onValidated(data).
onValidationFailedIf validation fails, this calls onValidationFailed(data).

Definition at line 53 of file validator.hpp.

void ndn::Validator::validate ( const Interest interest,
const OnInterestValidated onValidated,
const OnInterestValidationFailed onValidationFailed 
)
inlineinherited

Validate Interest and call either onValidated or onValidationFailed.

Parameters
interestThe Interest with the signature to check.
onValidatedIf the Interest is validated, this calls onValidated(interest).
onValidationFailedIf validation fails, this calls onValidationFailed(interest).

Definition at line 68 of file validator.hpp.

bool ndn::Validator::verifySignature ( const Data data,
const PublicKey publicKey 
)
staticinherited

Verify the data using the publicKey.

Definition at line 128 of file validator.cpp.

bool ndn::Validator::verifySignature ( const Interest interest,
const PublicKey publicKey 
)
staticinherited

Verify the signed Interest using the publicKey.

(Note the signature covers the first n-2 name components).

Definition at line 153 of file validator.cpp.

bool ndn::Validator::verifySignature ( const Buffer blob,
const Signature sig,
const PublicKey publicKey 
)
staticinherited

Verify the blob using the publicKey against the signature.

Definition at line 195 of file validator.cpp.

static bool ndn::Validator::verifySignature ( const Data data,
const SignatureSha256WithRsa sig,
const PublicKey publicKey 
)
inlinestaticinherited

Verify the data using the publicKey against the SHA256-RSA signature.

Definition at line 97 of file validator.hpp.

static bool ndn::Validator::verifySignature ( const Interest interest,
const SignatureSha256WithRsa sig,
const PublicKey publicKey 
)
inlinestaticinherited

Verify the interest using the publicKey against the SHA256-RSA signature.

(Note the signature covers the first n-2 name components).

Definition at line 111 of file validator.hpp.

static bool ndn::Validator::verifySignature ( const Buffer blob,
const SignatureSha256WithRsa sig,
const PublicKey publicKey 
)
inlinestaticinherited

Verify the blob using the publicKey against the SHA256-RSA signature.

Definition at line 127 of file validator.hpp.

bool ndn::Validator::verifySignature ( const uint8_t *  buf,
const size_t  size,
const SignatureSha256WithRsa sig,
const PublicKey publicKey 
)
staticinherited

Verify the blob using the publicKey against the SHA256-RSA signature.

Definition at line 220 of file validator.cpp.

static bool ndn::Validator::verifySignature ( const Data data,
const SignatureSha256 sig 
)
inlinestaticinherited

Verify the data against the SHA256 signature.

Definition at line 144 of file validator.hpp.

static bool ndn::Validator::verifySignature ( const Interest interest,
const SignatureSha256 sig 
)
inlinestaticinherited

Verify the interest against the SHA256 signature.

(Note the signature covers the first n-2 name components).

Definition at line 157 of file validator.hpp.

static bool ndn::Validator::verifySignature ( const Buffer blob,
const SignatureSha256 sig 
)
inlinestaticinherited

Verify the blob against the SHA256 signature.

Definition at line 171 of file validator.hpp.

bool ndn::Validator::verifySignature ( const uint8_t *  buf,
const size_t  size,
const SignatureSha256 sig 
)
staticinherited

Verify the blob against the SHA256 signature.

Definition at line 247 of file validator.cpp.

Field Documentation

Face& ndn::Validator::m_face
protectedinherited

Definition at line 251 of file validator.hpp.

bool ndn::Validator::m_hasFace
protectedinherited

Definition at line 250 of file validator.hpp.