Extends CertificateFetcherFromNetwork to fetch certificates from the incoming face of the packet. More...
#include <certificate-fetcher-direct-fetch.hpp>
Public Member Functions | |
CertificateFetcherDirectFetch (Face &face) | |
void | setSendDirectInterestOnly (bool wantDirectInterestOnly) |
If wantDirectInterestOnly , only the direct Interest will be sent out. More... | |
Public Member Functions inherited from ndn::security::v2::CertificateFetcherFromNetwork | |
CertificateFetcherFromNetwork (Face &face) | |
Public Member Functions inherited from ndn::security::v2::CertificateFetcher | |
CertificateFetcher () | |
virtual | ~CertificateFetcher () |
virtual void | setCertificateStorage (CertificateStorage &certStorage) |
Assign certificate storage to check known certificate and to cache unverified ones. More... | |
void | fetch (const shared_ptr< CertificateRequest > &certRequest, const shared_ptr< ValidationState > &state, const ValidationContinuation &continueValidation) |
Asynchronously fetch certificate. More... | |
Protected Member Functions | |
void | doFetch (const shared_ptr< CertificateRequest > &keyRequest, const shared_ptr< ValidationState > &state, const ValidationContinuation &continueValidation) override |
Asynchronous certificate fetching implementation. More... | |
Protected Member Functions inherited from ndn::security::v2::CertificateFetcherFromNetwork | |
void | doFetch (const shared_ptr< CertificateRequest > &certRequest, const shared_ptr< ValidationState > &state, const ValidationContinuation &continueValidation) override |
Asynchronous certificate fetching implementation. More... | |
void | dataCallback (const Data &data, const shared_ptr< CertificateRequest > &certRequest, const shared_ptr< ValidationState > &state, const ValidationContinuation &continueValidation) |
Callback invoked when certificate is retrieved. More... | |
void | nackCallback (const lp::Nack &nack, const shared_ptr< CertificateRequest > &certRequest, const shared_ptr< ValidationState > &state, const ValidationContinuation &continueValidation) |
Callback invoked when interest for fetching certificate gets NACKed. More... | |
void | timeoutCallback (const shared_ptr< CertificateRequest > &certRequest, const shared_ptr< ValidationState > &state, const ValidationContinuation &continueValidation) |
Callback invoked when interest for fetching certificate times out. More... | |
Additional Inherited Members | |
Public Types inherited from ndn::security::v2::CertificateFetcher | |
using | ValidationContinuation = std::function< void(const Certificate &cert, const shared_ptr< ValidationState > &state)> |
Protected Attributes inherited from ndn::security::v2::CertificateFetcherFromNetwork | |
Face & | m_face |
Scheduler | m_scheduler |
Protected Attributes inherited from ndn::security::v2::CertificateFetcher | |
CertificateStorage * | m_certStorage |
Extends CertificateFetcherFromNetwork to fetch certificates from the incoming face of the packet.
During Interest and Data validation, if IncomingFaceId tag is present on the original Interest, this fetcher will send a "direct Interest" to fetch certificates from the face where the original packet was received, in addition to fetching from the infrastructure. The application must enable NextHopFaceId privilege on the face used by this fetcher prior to the validation.
Definition at line 40 of file certificate-fetcher-direct-fetch.hpp.
|
explicit |
Definition at line 33 of file certificate-fetcher-direct-fetch.cpp.
void ndn::security::v2::CertificateFetcherDirectFetch::setSendDirectInterestOnly | ( | bool | wantDirectInterestOnly | ) |
If wantDirectInterestOnly
, only the direct Interest will be sent out.
Definition at line 39 of file certificate-fetcher-direct-fetch.cpp.
|
overrideprotectedvirtual |
Asynchronous certificate fetching implementation.
Implements ndn::security::v2::CertificateFetcher.
Definition at line 45 of file certificate-fetcher-direct-fetch.cpp.
References ndn::security::v2::CertificateFetcherFromNetwork::dataCallback(), ndn::security::v2::CertificateFetcherFromNetwork::doFetch(), ndn::Face::expressInterest(), ndn::SimpleTag< T, TypeId >::get(), ndn::security::v2::DataValidationState::getOriginalData(), ndn::security::v2::InterestValidationState::getOriginalInterest(), ndn::TagHost::getTag(), ndn::security::v2::CertificateFetcherFromNetwork::m_face, ndn::security::v2::CertificateFetcherFromNetwork::nackCallback(), ndn::Interest::refreshNonce(), ndn::TagHost::setTag(), and ndn::security::v2::CertificateFetcherFromNetwork::timeoutCallback().