From e024f0daaa888f0581bc8b5a28a05678544bd134 Mon Sep 17 00:00:00 2001 From: Dirk Date: Thu, 30 Oct 2025 13:49:45 +0100 Subject: [PATCH] Fix date parsing bc of locale problem The new block making sure that rust coreutils work properly (PR #2913) introduced a new check in order to determine which date functions to use. The function however parsed only for English error messages ("No such file"). This PR fixes #2929 that for 3.2 by setting LC_ALL to C. --- testssl.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/testssl.sh b/testssl.sh index c912810..1e089f6 100755 --- a/testssl.sh +++ b/testssl.sh @@ -468,11 +468,12 @@ declare TLS13_OSSL_CIPHERS="TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CH 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 # Ubuntu >= 25.10 HAS_GNUDATE=true - elif date -r 735275209 2>&1 | grep -q "No such file"; then + elif LC_ALL=C 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 @@ -484,6 +485,7 @@ fi date -j -f '%s' 1234567 >/dev/null 2>&1 && \ HAS_FREEBSDDATE=true + echo A | sed -E 's/A//' >/dev/null 2>&1 && \ declare -r HAS_SED_E=true || \ declare -r HAS_SED_E=false