public Task <IDictionary <string, X509Certificate2> > GetCertificatesAsync(IssuerConfiguration issuerConfiguration)
        {
            lock (funcLock)
            {
                if (certRetrieveTask != null && certificateCacheExpires > clock.GetLocalTime())
                {
                    return(certRetrieveTask);
                }

                // assume the cache is indefinite by default, and adjust back based on downloaded certificates.
                certificateCacheExpires = DateTime.MaxValue;

                certRetrieveTask = DoGetCertificateAsync(issuerConfiguration);
            }
            return(certRetrieveTask);
        }