mirror of
https://github.com/moparisthebest/curl
synced 2024-12-23 16:48:49 -05:00
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
This commit is contained in:
parent
eacfe36991
commit
56b32b5d75
@ -545,7 +545,7 @@ while (<TXT>) {
|
|||||||
print CRT @precert if($opt_m);
|
print CRT @precert if($opt_m);
|
||||||
my $maxStringLength = length(decode('UTF-8', $caname, Encode::FB_CROAK | Encode::LEAVE_SRC));
|
my $maxStringLength = length(decode('UTF-8', $caname, Encode::FB_CROAK | Encode::LEAVE_SRC));
|
||||||
if ($opt_t) {
|
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}});
|
my $string = $key . ": " . join(", ", @{$trust_purposes_by_level{$key}});
|
||||||
$maxStringLength = List::Util::max( length($string), $maxStringLength );
|
$maxStringLength = List::Util::max( length($string), $maxStringLength );
|
||||||
print CRT $string . "\n";
|
print CRT $string . "\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user