diff options
Diffstat (limited to 'scripts/make-hashes.pl')
-rw-r--r-- | scripts/make-hashes.pl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/make-hashes.pl b/scripts/make-hashes.pl index 07de9142..c5fb44fa 100644 --- a/scripts/make-hashes.pl +++ b/scripts/make-hashes.pl @@ -16,9 +16,11 @@ chomp(@files); print("test -d $dir || mkdir $dir\n"); for my $f (@files) { - my $prog = ($f =~ /\.cer$/) ? "x509" : "crl"; - my $h = `$openssl $prog -inform DER -in $f -noout -hash`; + my $type = ($f =~ /\.cer$/) ? "x509" : "crl"; + my $h = `$openssl $type -inform DER -in $f -noout -hash`; chomp($h); + $h .= "."; + $h .= "r" if ($type eq "crl"); my $n = 0 + $count{$h}++; - print("$openssl $prog -inform DER -outform PEM -out $dir/$h.$n -in $f\n"); + print("$openssl $type -inform DER -outform PEM -out $dir/$h$n -in $f\n"); } |