Allow Hydra's binary cache to be signed

[?]
Jan 8, 2014, 2:19 PM
AJVEJENFDMRMPLDWK5OCUIKLS7APCCXDVID5SQMVLY3CIJMYPW3QC

Dependencies

  • [2] IDT3SO3P Generate *.narinfo files on the fly to support the binary cache substituter

Change contents

  • edit in src/lib/Hydra/View/NARInfo.pm at line 7
    [2.778]
    [2.778]
    use Nix::Crypto;
  • edit in src/lib/Hydra/View/NARInfo.pm at line 31
    [2.1654]
    [2.1654]
    }
    # Optionally, sign the NAR info file we just created.
    my $privateKeyFile = $c->config->{binary_cache_private_key_file};
    my $keyName = $c->config->{binary_cache_key_name};
    if (defined $privateKeyFile && defined $keyName) {
    my $sig = signString($privateKeyFile, $info);
    $info .= "Signature: 1;$keyName;$sig\n";