Fetch certificate bundle from the network. More...
#include <certificate-bundle-fetcher.hpp>
Public Member Functions | |
CertificateBundleFetcher (unique_ptr< CertificateFetcher > inner, Face &face) | |
void | setBundleInterestLifetime (time::milliseconds time) |
Set the lifetime of certificate bundle interest. More... | |
time::milliseconds | getBundleInterestLifetime () const |
void | setCertificateStorage (CertificateStorage &certStorage) override |
Set the storage for this and inner certificate fetcher. More... | |
Public Member Functions inherited from ndn::security::v2::CertificateFetcher | |
CertificateFetcher () | |
virtual | ~CertificateFetcher () |
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 > &certRequest, const shared_ptr< ValidationState > &state, const ValidationContinuation &continueValidation) override |
Asynchronous certificate fetching implementation. 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::CertificateFetcher | |
CertificateStorage * | m_certStorage |
Fetch certificate bundle from the network.
Currently bundle fetching is attempted only for Data validation. This may change in the future. Bundle fetching always goes to the infrastructure regardless of the inner fetcher. Inner fetcher is used when the bundle interest times out or returns a Nack or when additional certificates are needed for validation.
Definition at line 41 of file certificate-bundle-fetcher.hpp.
|
explicit |
Definition at line 35 of file certificate-bundle-fetcher.cpp.
void ndn::security::v2::CertificateBundleFetcher::setBundleInterestLifetime | ( | time::milliseconds | time | ) |
Set the lifetime of certificate bundle interest.
Definition at line 45 of file certificate-bundle-fetcher.cpp.
References websocketpp::lib::asio::milliseconds().
time::milliseconds ndn::security::v2::CertificateBundleFetcher::getBundleInterestLifetime | ( | ) | const |
Definition at line 51 of file certificate-bundle-fetcher.cpp.
|
overridevirtual |
Set the storage for this and inner certificate fetcher.
Reimplemented from ndn::security::v2::CertificateFetcher.
Definition at line 57 of file certificate-bundle-fetcher.cpp.
References ndn::security::v2::CertificateFetcher::m_certStorage.
|
overrideprotectedvirtual |
Asynchronous certificate fetching implementation.
Implements ndn::security::v2::CertificateFetcher.
Definition at line 64 of file certificate-bundle-fetcher.cpp.
References ndn::Name::append(), ndn::Name::appendNumber(), ndn::Name::at(), ndn::security::v2::CertificateStorage::cacheUnverifiedCert(), ndn::Block::elements(), ndn::Name::empty(), ndn::name::Component::empty(), ndn::Face::expressInterest(), ndn::security::v2::CertificateCache::find(), ndn::name::Component::fromSegment(), ndn::Name::get(), ndn::Block::get(), ndn::Data::getContent(), ndn::MetaInfo::getFinalBlockId(), ndn::Data::getMetaInfo(), ndn::Data::getName(), ndn::Name::getPrefix(), ndn::lp::Nack::getReason(), ndn::name::Component::getSuccessor(), ndn::security::v2::CertificateStorage::getUnverifiedCertCache(), ndn::tlv::Interest, ndn::name::Component::isImplicitSha256Digest(), ndn::name::Component::isSegment(), ndn::security::v2::CertificateFetcher::m_certStorage, NDN_LOG_DEBUG_DEPTH, ndn::Block::parse(), ndn::Interest::setChildSelector(), ndn::Interest::setInterestLifetime(), ndn::Interest::setMustBeFresh(), and ndn::Name::size().