aboutsummaryrefslogtreecommitdiff
path: root/src/plugin/pluginloader.h
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/plugin/pluginloader.h
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/plugin/pluginloader.h')
-rw-r--r--src/plugin/pluginloader.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/plugin/pluginloader.h b/src/plugin/pluginloader.h
new file mode 100644
index 0000000..8d186aa
--- /dev/null
+++ b/src/plugin/pluginloader.h
@@ -0,0 +1,13 @@
+#include <QPluginLoader>
+
+class PluginLoader : public QPluginLoader
+{
+ Q_OBJECT
+
+public:
+ PluginLoader(const QString &fileName, QObject *parent = nullptr);
+ ~PluginLoader() = default;
+
+ bool verify(const char *hashName = "SHA256") const;
+};
+