Checks SSL certificate expiration.
use ssl_expiration2::SslExpiration;
let expiration = SslExpiration::from_domain_name("google.com").unwrap();
if expiration.is_expired() {
// do something if SSL certificate expired
}
use ssl_expiration2::SslExpiration;
let expiration =
SslExpiration::from_domain_name("google.com").expect("Domain validation has to work");
if expiration.days() < 14 {
// SSL certificate will expire in less than 2 weeks, run notification…
}