mirror of
https://github.com/drwetter/testssl.sh.git
synced 2024-12-29 12:59:44 +01:00
Fix issue with host certificate expiration
- wrong certificate name - fault logic (if statements) -- intermediate section looks not affected
This commit is contained in:
parent
4af901683a
commit
45b5d7a5d8
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user