aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/realisation.hh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2021-03-15 16:35:41 +0100
committerGitHub <noreply@github.com>2021-03-15 16:35:41 +0100
commita5e21aa13cb717ea7624ef802ffb99501d949104 (patch)
tree3daf6aa9e2876d32c895b505a3d283eadd40972e /src/libstore/realisation.hh
parent306c154632c03fe27e1513f4fb8797dd81536c05 (diff)
parent703c98c6cb922ff9d8cd8cb2c1104e0d3b15b803 (diff)
Merge pull request #4618 from NixOS/ca/sign-drvoutputs
Sign the derivation outputs
Diffstat (limited to 'src/libstore/realisation.hh')
-rw-r--r--src/libstore/realisation.hh8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libstore/realisation.hh b/src/libstore/realisation.hh
index fc92d3c17..f5049c9e9 100644
--- a/src/libstore/realisation.hh
+++ b/src/libstore/realisation.hh
@@ -3,6 +3,7 @@
#include "path.hh"
#include <nlohmann/json_fwd.hpp>
#include "comparator.hh"
+#include "crypto.hh"
namespace nix {
@@ -25,9 +26,16 @@ struct Realisation {
DrvOutput id;
StorePath outPath;
+ StringSet signatures;
+
nlohmann::json toJSON() const;
static Realisation fromJSON(const nlohmann::json& json, const std::string& whence);
+ std::string fingerprint() const;
+ void sign(const SecretKey &);
+ bool checkSignature(const PublicKeys & publicKeys, const std::string & sig) const;
+ size_t checkSignatures(const PublicKeys & publicKeys) const;
+
StorePath getPath() const { return outPath; }
GENERATE_CMP(Realisation, me->id, me->outPath);