summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGergely Nagy <ngg@tresorit.com>2021-01-05 12:49:55 +0100
committerDaniel Stenberg <daniel@haxx.se>2021-01-05 13:03:41 +0100
commit56b32b5d7570c7eb4275bfe513af6a758f1dfe94 (patch)
treefee2d990f36af86458d39dfeeebddba4dc8be40c
parenteacfe3699147afd4088fb76b78b173fe1f0c523e (diff)
downloadcurl-56b32b5d7570c7eb4275bfe513af6a758f1dfe94.tar.gz
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
-rwxr-xr-xlib/mk-ca-bundle.pl2
1 files changed, 1 insertions, 1 deletions
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 (<TXT>) {
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";