mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 08:16:15 +02:00
LegacySSHStore: Include signatures etc.
This commit is contained in:
parent
e02edb1483
commit
3ed8290e53
3 changed files with 10 additions and 1 deletions
|
@ -105,6 +105,13 @@ struct LegacySSHStore : public Store
|
||||||
readLongLong(conn->from); // download size
|
readLongLong(conn->from); // download size
|
||||||
info->narSize = readLongLong(conn->from);
|
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);
|
auto s = readString(conn->from);
|
||||||
assert(s == "");
|
assert(s == "");
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ namespace nix {
|
||||||
#define SERVE_MAGIC_1 0x390c9deb
|
#define SERVE_MAGIC_1 0x390c9deb
|
||||||
#define SERVE_MAGIC_2 0x5452eecb
|
#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_MAJOR(x) ((x) & 0xff00)
|
||||||
#define GET_PROTOCOL_MINOR(x) ((x) & 0x00ff)
|
#define GET_PROTOCOL_MINOR(x) ((x) & 0x00ff)
|
||||||
|
|
||||||
|
|
|
@ -858,6 +858,8 @@ static void opServe(Strings opFlags, Strings opArgs)
|
||||||
// !!! Maybe we want compression?
|
// !!! Maybe we want compression?
|
||||||
out << info->narSize // downloadSize
|
out << info->narSize // downloadSize
|
||||||
<< info->narSize;
|
<< info->narSize;
|
||||||
|
if (GET_PROTOCOL_MINOR(clientVersion) >= 4)
|
||||||
|
out << (info->narHash ? info->narHash.to_string() : "") << info->ca << info->sigs;
|
||||||
} catch (InvalidPath &) {
|
} catch (InvalidPath &) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue