Skip to content

Commit e024f0d

Browse files
committed
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.
1 parent 0b0b8ed commit e024f0d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

testssl.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,11 +468,12 @@ declare TLS13_OSSL_CIPHERS="TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CH
468468
HAS_GNUDATE=false
469469
HAS_FREEBSDDATE=false
470470
HAS_OPENBSDDATE=false
471+
471472
if date -d @735275209 >/dev/null 2>&1; then
472473
if date -r @735275209 >/dev/null 2>&1; then
473474
# Ubuntu >= 25.10
474475
HAS_GNUDATE=true
475-
elif date -r 735275209 2>&1 | grep -q "No such file"; then
476+
elif LC_ALL=C date -r 735275209 2>&1 | grep -q "No such file"; then
476477
# e.g. Debian 24.04, Debian 11-13
477478
HAS_GNUDATE=true
478479
elif date -r 735275209 >/dev/null 2>&1; then
@@ -484,6 +485,7 @@ fi
484485
date -j -f '%s' 1234567 >/dev/null 2>&1 && \
485486
HAS_FREEBSDDATE=true
486487

488+
487489
echo A | sed -E 's/A//' >/dev/null 2>&1 && \
488490
declare -r HAS_SED_E=true || \
489491
declare -r HAS_SED_E=false

0 commit comments

Comments
 (0)