about summary refs log tree commit diff
path: root/src/libstore
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-09-08T14·55+0200
committerEelco Dolstra <edolstra@gmail.com>2017-09-08T14·55+0200
commit3ed8290e5331011609de462bda67857837998583 (patch)
treea8504108fec7478241232edef0a0bd71b1a91175 /src/libstore
parente02edb14836fda29019adf95073092d874ebd925 (diff)
LegacySSHStore: Include signatures etc.
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/legacy-ssh-store.cc7
-rw-r--r--src/libstore/serve-protocol.hh2
2 files changed, 8 insertions, 1 deletions
diff --git a/src/libstore/legacy-ssh-store.cc b/src/libstore/legacy-ssh-store.cc
index 855a7c99aed6..dfefdb9bc874 100644
--- a/src/libstore/legacy-ssh-store.cc
+++ b/src/libstore/legacy-ssh-store.cc
@@ -105,6 +105,13 @@ struct LegacySSHStore : public Store
             readLongLong(conn->from); // download size
             info->narSize = readLongLong(conn->from);
 
+            if (GET_PROTOCOL_MINOR(conn->remoteVersion) >= 4) {
+                auto s = readString(conn->from);
+                info->narHash = s.empty() ? Hash() : Hash(s);
+                conn->from >> info->ca;
+                info->sigs = readStrings<StringSet>(conn->from);
+            }
+
             auto s = readString(conn->from);
             assert(s == "");
 
diff --git a/src/libstore/serve-protocol.hh b/src/libstore/serve-protocol.hh
index f8cc9a4b6ebe..f67d1e2580a5 100644
--- a/src/libstore/serve-protocol.hh
+++ b/src/libstore/serve-protocol.hh
@@ -5,7 +5,7 @@ namespace nix {
 #define SERVE_MAGIC_1 0x390c9deb
 #define SERVE_MAGIC_2 0x5452eecb
 
-#define SERVE_PROTOCOL_VERSION 0x203
+#define SERVE_PROTOCOL_VERSION 0x204
 #define GET_PROTOCOL_MAJOR(x) ((x) & 0xff00)
 #define GET_PROTOCOL_MINOR(x) ((x) & 0x00ff)