forked from lix-project/lix
parent
00a75b1cd2
commit
02654f782f
|
@ -37,10 +37,12 @@ SecretKey::SecretKey(const string & s)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !HAVE_SODIUM
|
||||||
[[noreturn]] static void noSodium()
|
[[noreturn]] static void noSodium()
|
||||||
{
|
{
|
||||||
throw Error("Nix was not compiled with libsodium, required for signed binary cache support");
|
throw Error("Nix was not compiled with libsodium, required for signed binary cache support");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
std::string SecretKey::signDetached(const std::string & data) const
|
std::string SecretKey::signDetached(const std::string & data) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -39,7 +39,7 @@ struct PublicKey : Key
|
||||||
private:
|
private:
|
||||||
PublicKey(const std::string & name, const std::string & key)
|
PublicKey(const std::string & name, const std::string & key)
|
||||||
: Key(name, key) { }
|
: Key(name, key) { }
|
||||||
friend class SecretKey;
|
friend struct SecretKey;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::map<std::string, PublicKey> PublicKeys;
|
typedef std::map<std::string, PublicKey> PublicKeys;
|
||||||
|
|
|
@ -48,7 +48,7 @@ protected:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void upsertFile(const std::string & path, const std::string & data)
|
void upsertFile(const std::string & path, const std::string & data) override
|
||||||
{
|
{
|
||||||
throw Error("uploading to an HTTP binary cache is not supported");
|
throw Error("uploading to an HTTP binary cache is not supported");
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ struct NarIndexer : ParseSink, StringSource
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void createDirectory(const Path & path)
|
void createDirectory(const Path & path) override
|
||||||
{
|
{
|
||||||
members.emplace(path,
|
members.emplace(path,
|
||||||
NarMember{FSAccessor::Type::tDirectory, false, 0, 0});
|
NarMember{FSAccessor::Type::tDirectory, false, 0, 0});
|
||||||
|
@ -44,7 +44,7 @@ struct NarIndexer : ParseSink, StringSource
|
||||||
currentPath = path;
|
currentPath = path;
|
||||||
}
|
}
|
||||||
|
|
||||||
void isExecutable()
|
void isExecutable() override
|
||||||
{
|
{
|
||||||
isExec = true;
|
isExec = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <exception>
|
#include <exception>
|
||||||
|
#include <stdexcept>
|
||||||
|
|
||||||
namespace nix {
|
namespace nix {
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
namespace nix {
|
namespace nix {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue