BinaryCacheStore::queryPathInfo: Don't check signatures

Other stores don't do this either. It's up to the caller to check
signatures.
This commit is contained in:
Eelco Dolstra 2016-04-29 16:28:57 +02:00
parent 95d20dfde9
commit f6aee2f477
2 changed files with 1 additions and 10 deletions

View file

@ -18,11 +18,8 @@ BinaryCacheStore::BinaryCacheStore(std::shared_ptr<Store> localStore,
const Path & secretKeyFile)
: localStore(localStore)
{
if (secretKeyFile != "") {
if (secretKeyFile != "")
secretKey = std::unique_ptr<SecretKey>(new SecretKey(readFile(secretKeyFile)));
publicKeys = std::unique_ptr<PublicKeys>(new PublicKeys);
publicKeys->emplace(secretKey->name, secretKey->toPublicKey());
}
StringSink sink;
sink << narVersionMagic1;
@ -213,11 +210,6 @@ std::shared_ptr<ValidPathInfo> BinaryCacheStore::queryPathInfoUncached(const Pat
stats.narInfoRead++;
if (publicKeys) {
if (!narInfo->checkSignatures(*publicKeys))
throw Error(format("no good signature on NAR info file %1%") % narInfoFile);
}
return std::shared_ptr<NarInfo>(narInfo);
}

View file

@ -16,7 +16,6 @@ class BinaryCacheStore : public Store
private:
std::unique_ptr<SecretKey> secretKey;
std::unique_ptr<PublicKeys> publicKeys;
std::shared_ptr<Store> localStore;