aboutsummaryrefslogtreecommitdiff
path: root/src/browser.cpp
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2019-03-11 19:39:06 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2019-03-11 19:39:06 +0200
commit95d92e52ed6d71c21433b382f8a178a04b04954b (patch)
treef7fba616df7a94de37003be7180976bbcc5b87f2 /src/browser.cpp
parentrepl: import python module (diff)
downloadsmolbote-95d92e52ed6d71c21433b382f8a178a04b04954b.tar.xz
Add PluginLoader class
- PluginLoader::verify can be used to check if the plugin has a valid (SHA512/RSA 4096) signature. - Uses nn OpenSSL public key that is embedded during the compile.
Diffstat (limited to 'src/browser.cpp')
-rw-r--r--src/browser.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/browser.cpp b/src/browser.cpp
index 69db6b2..db75fa1 100644
--- a/src/browser.cpp
+++ b/src/browser.cpp
@@ -38,6 +38,7 @@
#include "adblock/adblocklist.h"
#include "hostlist/hostlist.h"
#include <spdlog/spdlog.h>
+#include "plugin/pluginloader.h"
Browser::Browser(int &argc, char *argv[], bool allowSecondary)
: SingleApplication(argc, argv, allowSecondary, SingleApplication::User | SingleApplication::SecondaryNotification | SingleApplication::ExcludeAppVersion)
@@ -150,7 +151,8 @@ QPluginLoader *Browser::addPlugin(const QString &path)
if(path.isEmpty())
return nullptr;
- auto *loader = new QPluginLoader(path, this);
+ auto *loader = new PluginLoader(path, this);
+ spdlog::info("Verifying plugin: {}", loader->verify() ? "passed" : "failed");
loader->load();
auto *info = new PluginInfo(loader);