34 #define NDN_LOG_DEBUG_DEPTH(x) NDN_LOG_DEBUG(std::string(state->getDepth() + 1, '>') << " " << x)
37 : m_certStorage(nullptr)
51 const shared_ptr<ValidationState>& state,
56 if (cert !=
nullptr) {
58 continueValidation(*cert, state);
62 doFetch(certRequest, state,
63 [continueValidation,
this] (
const Certificate& cert,
const shared_ptr<ValidationState>& state) {
65 continueValidation(cert, state);
#define NDN_LOG_DEBUG_DEPTH(x)
const Certificate * find(const Name &certPrefix) const
Get certificate given key name.
Interface used by the validator to fetch missing certificates.
void fetch(const shared_ptr< CertificateRequest > &certRequest, const shared_ptr< ValidationState > &state, const ValidationContinuation &continueValidation)
Asynchronously fetch certificate.
CertificateStorage * m_certStorage
virtual ~CertificateFetcher()
std::function< void(const Certificate &cert, const shared_ptr< ValidationState > &state)> ValidationContinuation
virtual void setCertificateStorage(CertificateStorage &certStorage)
Assign certificate storage to check known certificate and to cache unverified ones.
Storage for trusted anchors, verified certificate cache, and unverified certificate cache.
const CertificateCache & getUnverifiedCertCache() const
void cacheUnverifiedCert(Certificate &&cert)
Cache unverified certificate for a period of time (5 minutes).
Represents an NDN certificate.
#define NDN_LOG_INIT(name)
Define a non-member log module.