31 #define NDN_LOG_DEBUG_DEPTH(x) NDN_LOG_DEBUG(std::string(state->getDepth() + 1, '>') << " " << x) 34 : m_certStorage(nullptr)
48 const shared_ptr<ValidationState>& state,
53 if (cert !=
nullptr) {
55 continueValidation(*cert, state);
58 doFetch(certRequest, state,
59 [continueValidation,
this] (
const Certificate& cert,
const shared_ptr<ValidationState>& state) {
61 continueValidation(cert, state);
Copyright (c) 2013-2017 Regents of the University of California.
The certificate following the certificate format naming convention.
Interface used by the validator to fetch missing certificates.
CertificateStorage * m_certStorage
void cacheUnverifiedCert(Certificate &&cert)
Cache unverified certificate for a period of time (5 minutes)
std::function< void(const Certificate &cert, const shared_ptr< ValidationState > &state)> ValidationContinuation
#define NDN_LOG_INIT(name)
declare a log module
const Certificate * find(const Name &certPrefix) const
Get certificate given key name.
const CertificateCache & getUnverifiedCertCache() const
Storage for trusted anchors, verified certificate cache, and unverified certificate cache...
void fetch(const shared_ptr< CertificateRequest > &certRequest, const shared_ptr< ValidationState > &state, const ValidationContinuation &continueValidation)
Asynchronously fetch certificate.
#define NDN_LOG_DEBUG_DEPTH(x)
virtual ~CertificateFetcher()
virtual void setCertificateStorage(CertificateStorage &certStorage)
Assign certificate storage to check known certificate and to cache unverified ones.