Move signatures from NarInfo to ValidPathInfo

This allows queryPathInfo() to return signatures.
This commit is contained in:
Eelco Dolstra 2016-03-21 18:05:47 +01:00
parent cebc150b7c
commit 712b616a84
4 changed files with 21 additions and 11 deletions

View file

@ -13,7 +13,6 @@ struct NarInfo : ValidPathInfo
Hash fileHash;
uint64_t fileSize = 0;
std::string system;
std::string sig; // FIXME: support multiple signatures
NarInfo() { }
NarInfo(const ValidPathInfo & info) : ValidPathInfo(info) { }
@ -31,9 +30,9 @@ struct NarInfo : ValidPathInfo
void sign(const SecretKey & secretKey);
/* Return true iff this .narinfo is signed by one of the specified
keys. */
bool checkSignature(const PublicKeys & publicKeys) const;
/* Return the number of signatures on this .narinfo that were
produced by one of the specified keys. */
unsigned int checkSignatures(const PublicKeys & publicKeys) const;
private: