1
0
mirror of https://github.com/drwetter/testssl.sh.git synced 2025-07-06 22:01:57 +02:00

Merge pull request from tkaehn/fix-expiration-check

Fix certificate expiration check
This commit is contained in:
Dirk Wetter
2015-08-13 10:35:19 +02:00

@ -1855,7 +1855,7 @@ run_server_defaults() {
SECS2WARN=$((24 * 60 * 60 * $DAYS2WARN2)) # low threshold first SECS2WARN=$((24 * 60 * 60 * $DAYS2WARN2)) # low threshold first
expire=$($OPENSSL x509 -in $HOSTCERT -checkend $SECS2WARN) expire=$($OPENSSL x509 -in $HOSTCERT -checkend $SECS2WARN)
if echo "$expire" | grep -qw not; then if echo "$expire" | grep -qw not; then
SECS2WARN=$((24 * 60 * 60 * $DAYS2WARN2)) SECS2WARN=$((24 * 60 * 60 * $DAYS2WARN1))
expire=$($OPENSSL x509 -in $HOSTCERT -checkend $SECS2WARN) expire=$($OPENSSL x509 -in $HOSTCERT -checkend $SECS2WARN)
if echo "$expire" | grep -qw not; then if echo "$expire" | grep -qw not; then
pr_litegreen ">= $DAYS2WARN1 days" pr_litegreen ">= $DAYS2WARN1 days"