aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/realisation.hh
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2021-04-05 18:29:52 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2021-04-05 18:29:52 -0400
commite12308dd63f0ad27b22dcdb3da89c411eebcad2b (patch)
treece5a9b558ca9a2787e44614d7cd423f2d9318618 /src/libstore/realisation.hh
parentf0ad29acc1f2c9e82679c3af434a8bf185f36b94 (diff)
parenta07dc7e0d99d1cd91643c9ecc2b672399471eaf4 (diff)
Merge branch 'master' into path-info
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 e1ab77c5b..adf1cf77a 100644
--- a/src/libstore/realisation.hh
+++ b/src/libstore/realisation.hh
@@ -6,6 +6,7 @@
#include "path.hh"
#include <nlohmann/json_fwd.hpp>
#include "comparator.hh"
+#include "crypto.hh"
namespace nix {
@@ -28,9 +29,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);