![]() |
![]()
| ![]() |
![]()
NAME
SYNOPSIS
DESCRIPTIONThe It's mainly used to check the expiration date of HTTPS certificates (which is the default target when the port number is not indicated), but the tool is protocol-agnostic and can "talk" to any SNI-aware (Server Name Information) SSL/TLS server (smtps, imaps, ldaps, etc.) without making too much assumptions on the correctness of servers certificates. The certificates can be saved to a specified directory with the
[ As it's intended to bulk process a lot of certificates, a progress
bar is displayed (can be removed with the
[ In order to avoid doing a Denial of Service attack on servers
hosting many certificates, a 1 second delay is waited between each
certificate request (can be specified otherwise with the
[ The tool results are presented as text tables. The main one is the list of certificates successfully fetched,
ordered by expiration date. This list can be filtered with the
[ The second table is the sorted list of hostnames / hostports where certificates couldn't be fetched, with our best attempts to identify the reason why. Two additional tables can be generated with the
[ Finally, for user convenience, all these reports can be generated
in a single multi-tabs Excel workbook specified with the
[ OPTIONS[ [ [ [ [ [ [ [ [ [ [ [ [ ENVIRONMENTThe FILES/usr/local/share/certwatch/tests.txt - config file example using the badssl.com Web site for testing live bogus X509 certificates. The structure of configuration files is as follows:
EXIT STATUSThe EXAMPLESThe following command will make # certwatch -in -e certwatch.out.xlsx -s mycertsdir -f 30 mycertslist.txt | tee certwatch.out.txt Saved certificates can then be viewed with the openssl command like this for a mycert.pem file: # openssl x509 -inform PEM -in mycert.pem -noout -text | more SEE ALSOSTANDARDSThe It tries to follow the PEP 8 style guide for Python code. PORTABILITYTested OK under Windows. Packaged for FreeBSD as pyXX-pnu-certwatch. HISTORYThis implementation was made for the PNU project Both for my own needs and those of my company, I wanted an easy way to monitor thousands of certificates expiration dates. The initial idea was to use the tool to send an email report of the certificates about to expire, but an Excel report in order to perform all kind of sorts and filtering was quickly necessary... LICENSEIt is available under the 3-clause BSD license. AUTHORSHubert Tournier CAVEATSUsing this command through outgoing proxies is untested and we provide no option to set the proxy address. However it should work through reverse proxies on the server side. SECURITY CONSIDERATIONSWhen certificate retrieval is unsuccessful,
|