public ICollection<X509Certificate2> GetExpiringCertificates(TimeSpan beforeExpiration)
 {
     using (var wrapper = new StoresWraper(_stores))
     {
         return (from cert in wrapper.Certificates
                 where (cert.NotAfter - DateTime.Now) < beforeExpiration &&
                       !_ignoringThumbprints.Contains(cert.Thumbprint)
                 orderby cert.NotAfter
                 select cert).ToArray();
     }
 }
예제 #2
0
 public ICollection <X509Certificate2> GetExpiringCertificates(TimeSpan beforeExpiration)
 {
     using (var wrapper = new StoresWraper(_stores))
     {
         return((from cert in wrapper.Certificates
                 where (cert.NotAfter - DateTime.Now) < beforeExpiration &&
                 !_ignoringThumbprints.Contains(cert.Thumbprint)
                 orderby cert.NotAfter
                 select cert).ToArray());
     }
 }