about summary refs log tree commit diff
path: root/third_party/nix/src/nix-daemon/nix-daemon-proto.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/nix-daemon/nix-daemon-proto.cc')
-rw-r--r--third_party/nix/src/nix-daemon/nix-daemon-proto.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/third_party/nix/src/nix-daemon/nix-daemon-proto.cc b/third_party/nix/src/nix-daemon/nix-daemon-proto.cc
index 26ae538f29ad..d94e34cb40cd 100644
--- a/third_party/nix/src/nix-daemon/nix-daemon-proto.cc
+++ b/third_party/nix/src/nix-daemon/nix-daemon-proto.cc
@@ -227,6 +227,20 @@ class WorkerServiceImpl final : public WorkerService::Service {
     return Status::OK;
   }
 
+  Status AddSignatures(grpc::ServerContext* context,
+                       const nix::proto::AddSignaturesRequest* request,
+                       google::protobuf::Empty* response) override {
+    auto path = request->path().path();
+    store_->assertStorePath(path);
+
+    StringSet sigs;
+    sigs.insert(request->sigs().sigs().begin(), request->sigs().sigs().end());
+
+    store_->addSignatures(path, sigs);
+
+    return Status::OK;
+  }
+
   Status QueryMissing(grpc::ServerContext* context, const StorePaths* request,
                       nix::proto::QueryMissingResponse* response) override {
     std::set<Path> targets;