aboutsummaryrefslogtreecommitdiff
path: root/lib/pluginloader
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2020-05-26 22:23:25 +0300
committerAqua-sama <aqua@iserlohn-fortress.net>2020-05-28 19:43:45 +0300
commit9c4dd932c6d692178bb8d5265c634126cb415767 (patch)
tree527300f8e710859965c142aed4e779a16b9d4ab6 /lib/pluginloader
parentUpdate ProfileEditor plugin (diff)
downloadsmolbote-9c4dd932c6d692178bb8d5265c634126cb415767.tar.xz
Turn on more warnings by default
- fix clazy warnings - fix various other compiler warnings - bugfix: connect profiles' downloadRequested signal
Diffstat (limited to 'lib/pluginloader')
-rw-r--r--lib/pluginloader/pluginloader.cpp6
-rw-r--r--lib/pluginloader/pluginloader.h2
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/pluginloader/pluginloader.cpp b/lib/pluginloader/pluginloader.cpp
index 082a449..ce84c7a 100644
--- a/lib/pluginloader/pluginloader.cpp
+++ b/lib/pluginloader/pluginloader.cpp
@@ -65,7 +65,11 @@ bool PluginLoader::verify(const char *hashName)
const std::size_t buffer_size = 1024;
std::vector<char> buffer(buffer_size);
- while(const auto sz = plugin.readsome(&buffer.front(), buffer_size)) {
+ std::size_t sz = 0;
+ while(true) {
+ sz = static_cast<std::size_t>(plugin.readsome(&buffer.front(), buffer_size));
+ if(sz <= 0)
+ break;
rc = EVP_DigestVerifyUpdate(ctx, reinterpret_cast<unsigned char *>(buffer.data()), sz);
if(rc != 1) {
m_sigError = tr("Failed to compute signature (stage=update)");
diff --git a/lib/pluginloader/pluginloader.h b/lib/pluginloader/pluginloader.h
index 703c285..cc67901 100644
--- a/lib/pluginloader/pluginloader.h
+++ b/lib/pluginloader/pluginloader.h
@@ -45,6 +45,6 @@ public:
bool verify(const char *hashName = "SHA256");
private:
- const int m_state;
+ const signature_state_t m_state;
QString m_sigError;
};