ndn::security::v2::ValidationPolicyAcceptAll Class Reference

A validator policy that accepts any signature of data and interest packets. More...

#include <validation-policy-accept-all.hpp>

Inheritance diagram for ndn::security::v2::ValidationPolicyAcceptAll:
[legend]
Collaboration diagram for ndn::security::v2::ValidationPolicyAcceptAll:
[legend]

Public Types

using ValidationContinuation = std::function< void(const shared_ptr< CertificateRequest > &certRequest, const shared_ptr< ValidationState > &state)>
 

Public Member Functions

void checkPolicy (const Data &data, const shared_ptr< ValidationState > &state, const ValidationContinuation &continueValidation) final
 Check data against the policy. More...
 
void checkPolicy (const Interest &interest, const shared_ptr< ValidationState > &state, const ValidationContinuation &continueValidation) final
 Check interest against the policy. More...
 
virtual void checkPolicy (const Certificate &certificate, const shared_ptr< ValidationState > &state, const ValidationContinuation &continueValidation)
 Check certificate against the policy. More...
 

Detailed Description

A validator policy that accepts any signature of data and interest packets.

Definition at line 34 of file validation-policy-accept-all.hpp.

Member Typedef Documentation

using ndn::security::v2::ValidationPolicy::ValidationContinuation = std::function<void(const shared_ptr<CertificateRequest>& certRequest, const shared_ptr<ValidationState>& state)>
inherited

Definition at line 41 of file validation-policy.hpp.

Member Function Documentation

void ndn::security::v2::ValidationPolicyAcceptAll::checkPolicy ( const Data data,
const shared_ptr< ValidationState > &  state,
const ValidationContinuation continueValidation 
)
inlinefinalvirtual

Check data against the policy.

Depending on implementation of the policy, this check can be done synchronously or asynchronously.

Semantics of checkPolicy has changed from v1::Validator

  • If packet violates policy, the policy should call state->fail with appropriate error code and error description.
  • If packet conforms to the policy and no further key retrievals are necessary, the policy should call continueValidation(state, nullptr)
  • If packet conforms to the policy and a key needs to be fetched, the policy should call continueValidation(state, <appropriate-key-request-instance>)

Implements ndn::security::v2::ValidationPolicy.

Definition at line 38 of file validation-policy-accept-all.hpp.

void ndn::security::v2::ValidationPolicyAcceptAll::checkPolicy ( const Interest interest,
const shared_ptr< ValidationState > &  state,
const ValidationContinuation continueValidation 
)
inlinefinalvirtual

Check interest against the policy.

Depending on implementation of the policy, this check can be done synchronously or asynchronously.

Semantics of checkPolicy has changed from v1::Validator

  • If packet violates policy, the policy should call state->fail with appropriate error code and error description.
  • If packet conforms to the policy and no further key retrievals are necessary, the policy should call continueValidation(state, nullptr)
  • If packet conforms to the policy and a key needs to be fetched, the policy should call continueValidation(state, <appropriate-key-request-instance>)

Implements ndn::security::v2::ValidationPolicy.

Definition at line 45 of file validation-policy-accept-all.hpp.

virtual void ndn::security::v2::ValidationPolicy::checkPolicy ( const Certificate certificate,
const shared_ptr< ValidationState > &  state,
const ValidationContinuation continueValidation 
)
inlinevirtualinherited

Check certificate against the policy.

Unless overridden by the policy, this check defaults to checkPolicy(const Data&, ...).

Depending on implementation of the policy, this check can be done synchronously or asynchronously.

Semantics of checkPolicy has changed from v1::Validator

  • If packet violates policy, the policy should call state->fail with appropriate error code and error description.
  • If packet conforms to the policy and no further key retrievals are necessary, the policy should call continueValidation(state, nullptr)
  • If packet conforms to the policy and a key needs to be fetched, the policy should call continueValidation(state, <appropriate-key-request-instance>)

Definition at line 99 of file validation-policy.hpp.