1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 20:01:15 +02:00

BinaryCacheStore: Make the signing key a parameter

This commit is contained in:
Eelco Dolstra 2016-04-29 16:47:20 +02:00
parent f6aee2f477
commit 8e065c6b3e
8 changed files with 21 additions and 46 deletions

View file

@ -15,9 +15,10 @@
namespace nix {
BinaryCacheStore::BinaryCacheStore(std::shared_ptr<Store> localStore,
const Path & secretKeyFile)
const StoreParams & params)
: localStore(localStore)
{
auto secretKeyFile = get(params, "secret-key", "");
if (secretKeyFile != "")
secretKey = std::unique_ptr<SecretKey>(new SecretKey(readFile(secretKeyFile)));