public static void AddOrUpdateCachedCertificate(string host, ACMECertificate certificate) { lock (_locker) { Instance.CachedCerts[host] = certificate; } }
public static bool TryGetCachedCertificate(List <string> hosts, out ACMECertificate value) { if (Instance.CachedCerts.TryGetValue(hosts[0], out value) == false) { return(false); } if ((value.Certificate.NotAfter - DateTime.UtcNow).TotalDays < 14) { return(false); } return(true); }