NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
nfd::CommandAuthenticatorValidationPolicy Class Reference

a validation policy that only permits Interest signed by a trust anchor More...

Inheritance diagram for nfd::CommandAuthenticatorValidationPolicy:
Collaboration diagram for nfd::CommandAuthenticatorValidationPolicy:

Public Member Functions

void checkPolicy (const Interest &interest, const shared_ptr< sec2::ValidationState > &state, const ValidationContinuation &continueValidation) final
 Check interest against the policy. More...
 
void checkPolicy (const Data &data, const shared_ptr< sec2::ValidationState > &state, const ValidationContinuation &continueValidation) final
 Check data against the policy. More...
 
- Public Member Functions inherited from ndn::security::v2::ValidationPolicy
 ValidationPolicy ()
 
virtual ~ValidationPolicy ()=default
 
void setInnerPolicy (unique_ptr< ValidationPolicy > innerPolicy)
 Set inner policy. More...
 
bool hasInnerPolicy () const
 Check if inner policy is set. More...
 
ValidationPolicygetInnerPolicy ()
 Return the inner policy. More...
 
void setValidator (Validator &validator)
 Set validator to which the policy is associated. More...
 
virtual void checkPolicy (const Certificate &certificate, const shared_ptr< ValidationState > &state, const ValidationContinuation &continueValidation)
 Check certificate against the policy. More...
 

Additional Inherited Members

- Public Types inherited from ndn::security::v2::ValidationPolicy
using ValidationContinuation = std::function< void(const shared_ptr< CertificateRequest > &certRequest, const shared_ptr< ValidationState > &state)>
 
- Public Attributes inherited from ndn::security::v2::ValidationPolicy
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PROTECTED __pad0__: Validator* m_validator
 
unique_ptr< ValidationPolicym_innerPolicy
 

Detailed Description

a validation policy that only permits Interest signed by a trust anchor

Definition at line 68 of file command-authenticator.cpp.

Member Function Documentation

void nfd::CommandAuthenticatorValidationPolicy::checkPolicy ( const Interest interest,
const shared_ptr< sec2::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 72 of file command-authenticator.cpp.

References ndn::security::v2::getKeyLocatorName(), ndn::security::v2::InterestValidationState::getOriginalInterest(), ndn::tlv::Interest, and ndn::TagHost::setTag().

void nfd::CommandAuthenticatorValidationPolicy::checkPolicy ( const Data data,
const shared_ptr< sec2::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 90 of file command-authenticator.cpp.


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