aboutsummaryrefslogtreecommitdiff
path: root/scripts/generate-testrepo.pl
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2006-09-12 02:52:09 +0000
committerRob Austein <sra@hactrn.net>2006-09-12 02:52:09 +0000
commit3e79780036f0837ef057f21c227ef5b34cbc3baa (patch)
tree6635074d686b04de70d900a22426ebea440f1981 /scripts/generate-testrepo.pl
parenta1dbece8f0e6e718f1e8a9bb55b03a24099ae15d (diff)
Hash CRLs too
svn path=/scripts/generate-testrepo.pl; revision=265
Diffstat (limited to 'scripts/generate-testrepo.pl')
-rw-r--r--scripts/generate-testrepo.pl15
1 files changed, 13 insertions, 2 deletions
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