From da436e7d87a637dffc2e4d1779d532613b2eb95c Mon Sep 17 00:00:00 2001 From: Dirk Date: Thu, 30 Oct 2025 13:30:08 +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 that by setting LC_ALL to C. Fixes #2929 . --- testssl.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/testssl.sh b/testssl.sh index 297f3093..a5de091c 100755 --- a/testssl.sh +++ b/testssl.sh @@ -476,11 +476,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 @@ -492,6 +493,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