From 56b32b5d7570c7eb4275bfe513af6a758f1dfe94 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Tue, 5 Jan 2021 12:49:55 +0100 Subject: mk-ca-bundle.pl: deterministic output when using -t Printing trust purposes are now sorted, making the output deterministic when running on the same input certdata.txt. Closes #6413 --- lib/mk-ca-bundle.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mk-ca-bundle.pl b/lib/mk-ca-bundle.pl index 5ed53fe0d..8c92c4431 100755 --- a/lib/mk-ca-bundle.pl +++ b/lib/mk-ca-bundle.pl @@ -545,7 +545,7 @@ while () { print CRT @precert if($opt_m); my $maxStringLength = length(decode('UTF-8', $caname, Encode::FB_CROAK | Encode::LEAVE_SRC)); if ($opt_t) { - foreach my $key (keys %trust_purposes_by_level) { + foreach my $key (sort keys %trust_purposes_by_level) { my $string = $key . ": " . join(", ", @{$trust_purposes_by_level{$key}}); $maxStringLength = List::Util::max( length($string), $maxStringLength ); print CRT $string . "\n"; -- cgit v1.2.1