Interface used by the validator to fetch missing certificates. More...
#include <ndn-cxx/security/certificate-fetcher.hpp>
Public Types | |
using | ValidationContinuation = std::function< void(const Certificate &cert, const shared_ptr< ValidationState > &state)> |
Public Member Functions | |
CertificateFetcher () | |
virtual | ~CertificateFetcher () |
void | fetch (const shared_ptr< CertificateRequest > &certRequest, const shared_ptr< ValidationState > &state, const ValidationContinuation &continueValidation) |
Asynchronously fetch certificate. More... | |
virtual void | setCertificateStorage (CertificateStorage &certStorage) |
Assign certificate storage to check known certificate and to cache unverified ones. More... | |
Protected Attributes | |
CertificateStorage * | m_certStorage |
Interface used by the validator to fetch missing certificates.
Definition at line 39 of file certificate-fetcher.hpp.
using ndn::security::v2::CertificateFetcher::ValidationContinuation = std::function<void(const Certificate& cert, const shared_ptr<ValidationState>& state)> |
Definition at line 42 of file certificate-fetcher.hpp.
ndn::security::v2::CertificateFetcher::CertificateFetcher | ( | ) |
Definition at line 36 of file certificate-fetcher.cpp.
|
virtualdefault |
void ndn::security::v2::CertificateFetcher::fetch | ( | const shared_ptr< CertificateRequest > & | certRequest, |
const shared_ptr< ValidationState > & | state, | ||
const ValidationContinuation & | continueValidation | ||
) |
Asynchronously fetch certificate.
If the requested certificate exists in the storage, then this method will immediately call continueValidation with the certification. If certificate is not available, the implementation-specific doFetch will be called to asynchronously fetch certificate. The successfully retrieved certificate will be automatically added to the unverified cache of the certificate storage.
When the requested certificate is retrieved, continueValidation is called. Otherwise, the fetcher implementation call state->failed() with the appropriate error code and diagnostic message.
Definition at line 50 of file certificate-fetcher.cpp.
|
virtual |
Assign certificate storage to check known certificate and to cache unverified ones.
certStorage
should be valid for the lifetime of CertificateFetcher Reimplemented in ndn::security::v2::CertificateBundleFetcher.
Definition at line 44 of file certificate-fetcher.cpp.
|
protected |
Definition at line 84 of file certificate-fetcher.hpp.