mirror of
https://github.com/NixOS/nix
synced 2025-06-28 09:31:16 +02:00
Mark content-addressed paths in the Nix database and in .narinfo
This allows such paths to be imported without signatures.
This commit is contained in:
parent
36a51ecab3
commit
d961c29c9c
11 changed files with 146 additions and 43 deletions
|
@ -67,6 +67,10 @@ NarInfo::NarInfo(const Store & store, const std::string & s, const std::string &
|
|||
system = value;
|
||||
else if (name == "Sig")
|
||||
sigs.insert(value);
|
||||
else if (name == "CA") {
|
||||
if (!ca.empty()) corrupt();
|
||||
ca = value;
|
||||
}
|
||||
|
||||
pos = eol + 1;
|
||||
}
|
||||
|
@ -101,6 +105,9 @@ std::string NarInfo::to_string() const
|
|||
for (auto sig : sigs)
|
||||
res += "Sig: " + sig + "\n";
|
||||
|
||||
if (!ca.empty())
|
||||
res += "CA: " + ca + "\n";
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue