matteocorti/check_ssl_cert

Wrong expires in Days

Closed this issue · 0 comments

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