diff --git a/src/lib/Hydra/View/NARInfo.pm b/src/lib/Hydra/View/NARInfo.pm index 801fc06a5..02a4804ee 100644 --- a/src/lib/Hydra/View/NARInfo.pm +++ b/src/lib/Hydra/View/NARInfo.pm @@ -38,7 +38,12 @@ sub process { # Optionally, sign the NAR info file we just created. my $secretKeyFile = $c->config->{binary_cache_secret_key_file}; if (defined $secretKeyFile) { - my $secretKey = readFile $secretKeyFile; + my $secretKey = ""; + open my $fh, '<', $secretKeyFile or die "Could not open file '$secretKeyFile' $!"; + while (<$fh>) { + $secretKey .= $_; + } + close $fh; my $fingerprint = fingerprintPath($storePath, $narHash, $narSize, $refs); my $sig = signString($secretKey, $fingerprint); $info .= "Sig: $sig\n";