aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2020-01-26 23:14:53 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2020-01-27 15:58:31 +0200
commit0bf5450365934c39ed0bb480712adaab2fa54386 (patch)
tree15b90e626ca7f29c9fa219addf17e9cf618b6496 /src/main.cpp
parentMove compiler flags to meson.build from pkgbuild (diff)
downloadsmolbote-0bf5450365934c39ed0bb480712adaab2fa54386.tar.xz
pluginloader: add test for PluginLoader::verify
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 98e8ef9..3394a84 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -105,8 +105,14 @@ int main(int argc, char **argv)
[&]() {
Configuration conf;
spdlog::debug("plugins.path={}", conf.value<std::string>("plugins.path").value());
+
+ const PluginLoader::SignatureState state(
+ conf.value<bool>("plugins.signature.ignored").value(),
+ conf.value<bool>("plugins.signature.checked").value(),
+ conf.value<bool>("plugins.signature.enforced").value());
+
for(const QString &path : Util::files(conf.value<QString>("plugins.path").value(), { "*.so", "*.dll" })) {
- auto *loader = new PluginLoader(path);
+ auto *loader = new PluginLoader(path, state);
const bool loaded = loader->load();
spdlog::info("{} plugin {}", loaded ? "Loaded" : "Failed to load", qUtf8Printable(path));