From 95d92e52ed6d71c21433b382f8a178a04b04954b Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Mon, 11 Mar 2019 19:39:06 +0200 Subject: 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. --- src/browser.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/browser.cpp') 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 +#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); -- cgit v1.2.1