Class: CertificateFetcher

CertificateFetcher()

new CertificateFetcher()

CertificateFetcher is an abstract base class which provides an interface used by the validator to fetch missing certificates.
Source:

Methods

doFetch_(certificateRequest, state, continueValidation)

An implementation to fetch a certificate asynchronously. The subclass must implement this method.
Parameters:
Name Type Description
certificateRequest CertificateRequest The the request with the Interest for fetching the certificate.
state ValidationState The validation state.
continueValidation function After fetching, this calls continueValidation(certificate, state) where certificate is the fetched certificate and state is the ValidationState.
Source:

fetch(certificateRequest, state, continueValidation)

Asynchronously fetch a certificate. setCertificateStorage must have been called first. If the requested certificate exists in the storage, then this method will immediately call continueValidation with the certificate. If certificate is not available, then the implementation-specific doFetch will be called to asynchronously fetch the 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 calls state.failed() with the appropriate error code and diagnostic message.
Parameters:
Name Type Description
certificateRequest CertificateRequest The the request with the Interest for fetching the certificate.
state ValidationState The validation state.
continueValidation function After fetching, this calls continueValidation(certificate, state) where certificate is the fetched certificate and state is the ValidationState.
Source:

setCertificateStorage(certificateStorage)

Assign the certificate storage used to check for known certificates and to cache unverified ones.
Parameters:
Name Type Description
certificateStorage CertificateStorage The certificate storage object which must be valid for the lifetime of this CertificateFetcher.
Source: