Crates.io | ssl-expiration2 |
lib.rs | ssl-expiration2 |
version | 0.4.0 |
source | src |
created_at | 2020-06-30 12:07:20.363853 |
updated_at | 2021-05-15 21:21:07.27625 |
description | Checks SSL certificate expiration |
homepage | |
repository | https://github.com/VerKnowSys/ssl-expiration |
max_upload_size | |
id | 259811 |
size | 15,836 |
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…
}