6 releases
0.4.0 | May 15, 2021 |
---|---|
0.3.0 | Feb 7, 2021 |
0.2.3 | Jan 17, 2021 |
0.2.2 | Jul 10, 2020 |
0.2.0 | Jun 30, 2020 |
#1132 in Cryptography
Used in 2 crates
(via krecik)
10KB
185 lines
ssl-expiration2
Checks SSL certificate expiration.
Usage
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…
}
lib.rs
:
Checks SSL certificate expiration.
This crate will try to connect a remote server and check SSL certificate expiration.
Basic usage example:
use ssl_expiration2::SslExpiration;
let expiration = SslExpiration::from_domain_name("google.com").unwrap();
if expiration.is_expired() {
// do something if SSL certificate expired
}
Check days before expiration example:
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…
}
Dependencies
~4–11MB
~127K SLoC