mirror of
				https://github.com/drwetter/testssl.sh.git
				synced 2025-10-30 21:35:26 +01: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:
		| @@ -470,10 +470,14 @@ 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 | ||||
|           # 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. | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Dirk Wetter
					Dirk Wetter