Merge pull request #1756 from drwetter/fix_1755

Fix issue with host certificate expiration
This commit is contained in:
Dirk Wetter 2020-10-26 21:45:41 +01:00 committed by GitHub
commit d531981e31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9046,9 +9046,9 @@ certificate_info() {
set_grade_cap "T" "Certificate expired"
else
# low threshold first
if ! [[ "$($OPENSSL x509 -checkend $((secsaday*days2warn2)) 2>>$ERRFILE <<< "$cert")" =~ \ not\ ]]; then
if [[ "$($OPENSSL x509 -checkend $((secsaday*days2warn2)) 2>>$ERRFILE <<< "$hostcert")" =~ \ not\ ]]; then
# high threshold
if ! [[ "$($OPENSSL x509 -checkend $((secsaday*days2warn1)) 2>>$ERRFILE <<< "$cert")" =~ \ not\ ]]; then
if [[ "$($OPENSSL x509 -checkend $((secsaday*days2warn1)) 2>>$ERRFILE <<< "$hostcert")" =~ \ not\ ]]; then
pr_svrty_good "$days2expire >= $days2warn1 days"
expfinding+="$days2expire >= $days2warn1 days"
else