Be more robust wrt broken .narinfo files
This commit is contained in:
parent
f0f30f594c
commit
a64da5915d
|
@ -462,9 +462,16 @@ sub parseNARInfo {
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $fingerprint = fingerprintPath(
|
my $fingerprint;
|
||||||
$storePath, $narHash, $narSize,
|
eval {
|
||||||
[ map { "$Nix::Config::storeDir/$_" } @refs ]);
|
$fingerprint = fingerprintPath(
|
||||||
|
$storePath, $narHash, $narSize,
|
||||||
|
[ map { "$Nix::Config::storeDir/$_" } @refs ]);
|
||||||
|
};
|
||||||
|
if ($@) {
|
||||||
|
warn "cannot compute fingerprint of ‘$location’; ignoring\n";
|
||||||
|
return undef;
|
||||||
|
}
|
||||||
|
|
||||||
if (!checkSignature($publicKey, decode_base64($sig64), $fingerprint)) {
|
if (!checkSignature($publicKey, decode_base64($sig64), $fingerprint)) {
|
||||||
warn "NAR info file ‘$location’ has an incorrect signature; ignoring\n";
|
warn "NAR info file ‘$location’ has an incorrect signature; ignoring\n";
|
||||||
|
|
Loading…
Reference in a new issue