Validation state for an interest packet. More...
#include <validation-state.hpp>
Public Member Functions | |
InterestValidationState (const Interest &interest, const InterestValidationSuccessCallback &successCb, const InterestValidationFailureCallback &failureCb) | |
Create validation state for interest . More... | |
~InterestValidationState () final | |
Destructor. More... | |
void | addCertificate (const Certificate &cert) |
Add cert to the top of the certificate chain. More... | |
void | fail (const ValidationError &error) final |
Call the failure callback. More... | |
size_t | getDepth () const |
const Interest & | getOriginalInterest () const |
boost::logic::tribool | getOutcome () const |
template<typename T > | |
shared_ptr< T > | getTag () const |
get a tag item More... | |
bool | hasSeenCertificateName (const Name &certName) |
Check if certName has been previously seen and record the supplied name. More... | |
template<typename T > | |
void | removeTag () const |
remove tag item More... | |
template<typename T > | |
void | setTag (shared_ptr< T > tag) const |
set a tag item More... | |
Public Attributes | |
util::Signal< InterestValidationState, Interest > | afterSuccess |
Protected Attributes | |
boost::logic::tribool | m_outcome |
Validation state for an interest packet.
Definition at line 204 of file validation-state.hpp.
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.
|
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.
|
inherited |
Add cert
to the top of the certificate chain.
If m_certificateChain is empty, cert
should be the signer of the original packet. If m_certificateChain is not empty, cert
should be the signer of m_certificateChain.front().
Definition at line 60 of file validation-state.cpp.
|
finalvirtual |
Call the failure callback.
Implements ndn::security::v2::ValidationState.
Definition at line 192 of file validation-state.cpp.
|
inherited |
Definition at line 48 of file validation-state.cpp.
const Interest & ndn::security::v2::InterestValidationState::getOriginalInterest | ( | ) | const |
Definition at line 201 of file validation-state.cpp.
|
inlineinherited |
Definition at line 70 of file validation-state.hpp.
|
inlineinherited |
get a tag item
T | type of the tag, which must be a subclass of ndn::Tag |
nullptr | if no Tag of type T is stored |
Definition at line 67 of file tag-host.hpp.
|
inherited |
Check if certName
has been previously seen and record the supplied name.
Definition at line 54 of file validation-state.cpp.
|
inlineinherited |
remove tag item
Definition at line 94 of file tag-host.hpp.
|
inlineinherited |
set a tag item
T | type of the tag, which must be a subclass of ndn::Tag |
Definition at line 80 of file tag-host.hpp.
util::Signal<InterestValidationState, Interest> ndn::security::v2::InterestValidationState::afterSuccess |
Definition at line 235 of file validation-state.hpp.
|
protectedinherited |
Definition at line 139 of file validation-state.hpp.