From 3e79780036f0837ef057f21c227ef5b34cbc3baa Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Tue, 12 Sep 2006 02:52:09 +0000 Subject: Hash CRLs too svn path=/scripts/generate-testrepo.pl; revision=265 --- scripts/generate-testrepo.pl | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'scripts/generate-testrepo.pl') diff --git a/scripts/generate-testrepo.pl b/scripts/generate-testrepo.pl index e1e7dda2..a49bd29f 100644 --- a/scripts/generate-testrepo.pl +++ b/scripts/generate-testrepo.pl @@ -266,14 +266,25 @@ EOF # Generate hashes for my $cert (map({("$_.cer", "$_-EE.cer")} @ordering)) { - my $hash = `openssl x509 -noout -hash -in $cert`; + my $hash = `$openssl x509 -noout -hash -in $cert`; chomp($hash); - $hash .= "." . (0 + $hashes{$hash}++); + $hash .= "."; + $hash .= (0 + $hashes{$hash}++); unlink($hash) if (-l $hash); symlink($cert, $hash) or die("Couldn't link $hash to $cert: $!\n"); } +for my $crl (map({"$_.crl"} @ordering)) { + my $hash = `$openssl crl -noout -hash -in $crl`; + chomp($hash); + $hash .= ".r"; + $hash .= (0 + $hashes{$hash}++); + unlink($hash) if (-l $hash); + symlink($crl, $hash) + or die("Couldn't link $hash to $crl: $!\n"); +} + # Generate PKCS12 forms of EE certificates # -chain argument to pkcs12 requires certificate store, which we configure via an environment variable -- cgit v1.2.3