mirror of
https://github.com/NixOS/nix
synced 2025-06-26 20:01:15 +02:00
Move signPathInfo
to Store
Motivation is the same for moving `signRealisation` in
db8439c328
.
This commit is contained in:
parent
1bff2aeec0
commit
d572533774
4 changed files with 21 additions and 20 deletions
|
@ -1274,6 +1274,21 @@ Derivation Store::readDerivation(const StorePath & drvPath)
|
|||
Derivation Store::readInvalidDerivation(const StorePath & drvPath)
|
||||
{ return readDerivationCommon(*this, drvPath, false); }
|
||||
|
||||
|
||||
void Store::signPathInfo(ValidPathInfo & info)
|
||||
{
|
||||
// FIXME: keep secret keys in memory.
|
||||
|
||||
auto secretKeyFiles = settings.secretKeyFiles;
|
||||
|
||||
for (auto & secretKeyFile : secretKeyFiles.get()) {
|
||||
SecretKey secretKey(readFile(secretKeyFile));
|
||||
LocalSigner signer(std::move(secretKey));
|
||||
info.sign(*this, signer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Store::signRealisation(Realisation & realisation)
|
||||
{
|
||||
// FIXME: keep secret keys in memory.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue