matteocorti / check_ssl_cert

A shell script (that can be used as a Nagios/Icinga plugin) to check an SSL/TLS connection.
GNU General Public License v3.0
371 stars 132 forks source link

Wrong expires in Days #476

Closed berndschneider5 closed 1 year ago

berndschneider5 commented 1 year ago

Hello Matteo,

my check shows me the correct valid until date, but calculates the expires in Days wrong.

For example: I have an internal certificate that is valid until Oct 4 07:54:54 2025 GMT, valid until is correct displayed but the output says: expires in 269 days It is an internal certificate and there we have certificates with two years. i used version 2.38 until now. I used also the current verseion, 2.76, for testing as well. This new script now says: "The certificate cannot be valid for more than 397 days". I saw that there are new options, and when i use --ignore-maximum-validity, than the check is ok, but again with the wrong Days when it will expire.

The script is running on Rhel 7.9 and OpenSSL 1.0.2k-fips 26 Jan 2017