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

Validation state for an interest packet. More...

#include <validation-state.hpp>

Inheritance diagram for ndn::security::v2::InterestValidationState:
Collaboration diagram for ndn::security::v2::InterestValidationState:

Public Member Functions

 InterestValidationState (const Interest &interest, const InterestValidationSuccessCallback &successCb, const InterestValidationFailureCallback &failureCb)
 Create validation state for interest. More...
 
 ~InterestValidationState () final
 Destructor. More...
 
void fail (const ValidationError &error) final
 Call the failure callback. More...
 
const InterestgetOriginalInterest () const
 
- Public Member Functions inherited from ndn::security::v2::ValidationState
 ValidationState ()
 Create validation state. More...
 
virtual ~ValidationState ()
 
boost::logic::tribool getOutcome () const
 
size_t getDepth () const
 
bool hasSeenCertificateName (const Name &certName)
 Check if certName has been previously seen and record the supplied name. More...
 
void addCertificate (const Certificate &cert)
 Add cert to the top of the certificate chain. More...
 
- Public Member Functions inherited from ndn::TagHost
template<typename T >
shared_ptr< T > getTag () const
 get a tag item More...
 
template<typename T >
void setTag (shared_ptr< T > tag) const
 set a tag item More...
 
template<typename T >
void removeTag () const
 remove tag item More...
 

Public Attributes

util::Signal< InterestValidationState, InterestafterSuccess
 

Additional Inherited Members

- Protected Attributes inherited from ndn::security::v2::ValidationState
boost::logic::tribool m_outcome
 

Detailed Description

Validation state for an interest packet.

Definition at line 207 of file validation-state.hpp.

Constructor & Destructor Documentation

◆ InterestValidationState()

ndn::security::v2::InterestValidationState::InterestValidationState ( const Interest interest,
const InterestValidationSuccessCallback successCb,
const InterestValidationFailureCallback failureCb 
)

Create validation state for interest.

The caller must ensure that state instance is valid until validation finishes (i.e., until after validateCertificateChain() and validateOriginalPacket() are called)

Definition at line 148 of file validation-state.cpp.

References afterSuccess.

◆ ~InterestValidationState()

ndn::security::v2::InterestValidationState::~InterestValidationState ( )
final

Destructor.

If neither success callback nor failure callback was called, the destructor will call failure callback with IMPLEMENTATION_ERROR error code.

Definition at line 159 of file validation-state.cpp.

References afterSuccess, fail(), ndn::Interest::getName(), ndn::security::v2::ValidationState::m_outcome, NDN_LOG_TRACE_DEPTH, ndn::Name::toUri(), and ndn::security::verifySignature().

Member Function Documentation

◆ fail()

void ndn::security::v2::InterestValidationState::fail ( const ValidationError error)
finalvirtual

Call the failure callback.

Implements ndn::security::v2::ValidationState.

Definition at line 192 of file validation-state.cpp.

References ndn::security::v2::ValidationState::m_outcome, and NDN_LOG_DEBUG_DEPTH.

Referenced by ~InterestValidationState().

◆ getOriginalInterest()

const Interest & ndn::security::v2::InterestValidationState::getOriginalInterest ( ) const
Returns
Original interest being validated

Definition at line 201 of file validation-state.cpp.

Referenced by ndn::security::v2::CertificateFetcherDirectFetch::doFetch().

Member Data Documentation

◆ afterSuccess

util::Signal<InterestValidationState, Interest> ndn::security::v2::InterestValidationState::afterSuccess

Definition at line 238 of file validation-state.hpp.

Referenced by InterestValidationState(), and ~InterestValidationState().


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