#ssl #ssl-certificate #chain #less #work #tls

bin+lib ssl-expiration2

Checks SSL certificate expiration

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
Download history 27/week @ 2023-10-25 22/week @ 2023-11-01 19/week @ 2023-11-08 20/week @ 2023-11-15 18/week @ 2023-11-22 36/week @ 2023-11-29 6/week @ 2023-12-06 17/week @ 2023-12-13 16/week @ 2023-12-20 14/week @ 2023-12-27 12/week @ 2024-01-03 15/week @ 2024-01-10 16/week @ 2024-01-17 21/week @ 2024-01-24 17/week @ 2024-01-31 18/week @ 2024-02-07

73 downloads per month
Used in 2 crates (via krecik)

MIT license

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–6MB
~123K SLoC