mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-10-13 00:01:05 +02:00
Fix date for Ubuntu >= 25.10 (3.2)
Ubuntu 25.10 has transitionned from GNU Core-utils to Rust Core-utils. That changes the testing results which date version to use for displaying / conversion of dates like in certificates. Probably more Linux distriutions will follow. See also #2909 . For maintenance reasons it is advised also the stable version will get this patched. For 3.3dev, see #2913 .
This commit is contained in:
parent
a3372ed1a4
commit
df652c05cd
10
testssl.sh
10
testssl.sh
@ -469,11 +469,15 @@ HAS_GNUDATE=false
|
||||
HAS_FREEBSDDATE=false
|
||||
HAS_OPENBSDDATE=false
|
||||
if date -d @735275209 >/dev/null 2>&1; then
|
||||
if date -r @735275209 >/dev/null 2>&1; then
|
||||
if date -r @735275209 >/dev/null 2>&1; then
|
||||
# Ubuntu >= 25.10
|
||||
HAS_GNUDATE=true
|
||||
elif date -r 735275209 2>&1 | grep -q "No such file"; then
|
||||
# e.g. Debian 24.04, Debian 11-13
|
||||
HAS_GNUDATE=true
|
||||
elif date -r 735275209 >/dev/null 2>&1; then
|
||||
# It can't do any conversion from a plain date output.
|
||||
HAS_OPENBSDDATE=true
|
||||
else
|
||||
HAS_GNUDATE=true
|
||||
fi
|
||||
fi
|
||||
# FreeBSD and OS X date(1) accept "-f inputformat", so do newer OpenBSD versions >~ 6.6.
|
||||
|
Loading…
x
Reference in New Issue
Block a user