From 173fd7cdcaa17b70c19ea91a8a919654c5007f1b Mon Sep 17 00:00:00 2001 From: Marc Hartmayer Date: Fri, 15 Mar 2024 12:03:46 +0000 Subject: [PATCH] genprotimg/samples/check_hostkeydoc: set `LC_ALL=C` for the sort command Set `LC_ALL=C` for the `sort` command to get a stable sort order. See https://pubs.opengroup.org/onlinepubs/9699919799/utilities/sort.html for details on the effect of LC_* on `sort`. Adapt the default issuer accordingly. Reviewed-by: Steffen Eiden Signed-off-by: Marc Hartmayer Signed-off-by: Steffen Eiden --- genprotimg/samples/check_hostkeydoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/genprotimg/samples/check_hostkeydoc b/genprotimg/samples/check_hostkeydoc index 5a49d533..ad728e88 100755 --- a/genprotimg/samples/check_hostkeydoc +++ b/genprotimg/samples/check_hostkeydoc @@ -121,7 +121,7 @@ canonical_dn() OUTPUT=$4 openssl $OBJTYPE -in $OBJ -$DNTYPE -noout -nameopt multiline \ - | sort | grep -v $DNTYPE= > $OUTPUT + | LC_ALL=C sort | grep -v $DNTYPE= > $OUTPUT } default_issuer() @@ -130,8 +130,8 @@ default_issuer() commonName = International Business Machines Corporation countryName = US localityName = Poughkeepsie - organizationalUnitName = Key Signing Service organizationName = International Business Machines Corporation + organizationalUnitName = Key Signing Service stateOrProvinceName = New York EOF }