mirror of
https://github.com/NixOS/nix
synced 2025-06-26 15:51:15 +02:00
BinaryCacheStore: Remove publicKeyFile argument
The public key can be derived from the secret key, so there's no need for the user to supply it separately.
This commit is contained in:
parent
42bc395b63
commit
af7cdb1096
7 changed files with 39 additions and 25 deletions
|
@ -14,16 +14,13 @@
|
|||
namespace nix {
|
||||
|
||||
BinaryCacheStore::BinaryCacheStore(std::shared_ptr<Store> localStore,
|
||||
const Path & secretKeyFile, const Path & publicKeyFile)
|
||||
const Path & secretKeyFile)
|
||||
: localStore(localStore)
|
||||
{
|
||||
if (secretKeyFile != "")
|
||||
if (secretKeyFile != "") {
|
||||
secretKey = std::unique_ptr<SecretKey>(new SecretKey(readFile(secretKeyFile)));
|
||||
|
||||
if (publicKeyFile != "") {
|
||||
publicKeys = std::unique_ptr<PublicKeys>(new PublicKeys);
|
||||
auto key = PublicKey(readFile(publicKeyFile));
|
||||
publicKeys->emplace(key.name, key);
|
||||
publicKeys->emplace(secretKey->name, secretKey->toPublicKey());
|
||||
}
|
||||
|
||||
StringSink sink;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue