aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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