2017-12-12 11:53:53 -08:00
|
|
|
# certexp
|
|
|
|
|
2018-01-12 10:18:51 -08:00
|
|
|
A tool that reports certificate expiry for a collection of servers. It yields
|
|
|
|
equivalent information to:
|
2017-12-12 11:53:53 -08:00
|
|
|
|
|
|
|
```bash
|
|
|
|
$ echo | openssl s_client -connect $hostname:$port 2> /dev/null | openssl x509 -noout -dates | grep notAfter
|
|
|
|
```
|
|
|
|
|
2018-01-12 10:18:51 -08:00
|
|
|
but fetches the information for a colleciton of hosts and does it concurrently.
|
|
|
|
|
2017-12-12 11:53:53 -08:00
|
|
|
## example usage
|
|
|
|
|
2018-01-12 10:15:10 -08:00
|
|
|
```bash
|
|
|
|
$ certexp google.com amazon.com imap.gmail.com:993
|
|
|
|
google.com:443 2018-03-07 13:01:00 +0000 UTC
|
|
|
|
imap.gmail.com:993 2018-03-07 13:02:00 +0000 UTC
|
|
|
|
amazon.com:443 2018-09-21 23:59:59 +0000 UTC
|
|
|
|
```
|
|
|
|
|
|
|
|
or to stdin:
|
|
|
|
|
2017-12-12 11:53:53 -08:00
|
|
|
```bash
|
|
|
|
$ cat sites.txt
|
|
|
|
apple.com
|
|
|
|
google.com
|
|
|
|
amazon.com
|
|
|
|
imap.gmail.com:993
|
|
|
|
$ cat sites.txt | certexp
|
|
|
|
apple.com 2018-10-31 23:59:59 +0000 UTC
|
|
|
|
google.com 2018-02-13 15:19:00 +0000 UTC
|
|
|
|
amazon.com 2018-09-21 23:59:59 +0000 UTC
|
|
|
|
imap.gmail.com 2018-02-27 09:29:00 +0000 UTC
|
|
|
|
```
|