aboutsummaryrefslogtreecommitdiffstats
path: root/include/gpg/GpgContext.h
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2021-05-22 15:58:59 +0000
committerSaturneric <[email protected]>2021-05-22 15:58:59 +0000
commitd9121e76c7eeb63b23a6a772d38e61b60abfe93d (patch)
tree965f9f27bba242a584b73ef4947ce54fa652390f /include/gpg/GpgContext.h
parentExpand and improve GpgKey; (diff)
downloadGpgFrontend-d9121e76c7eeb63b23a6a772d38e61b60abfe93d.tar.gz
GpgFrontend-d9121e76c7eeb63b23a6a772d38e61b60abfe93d.zip
Enhance code robustness;
Improve performance for GpgKey; Fix code defects. Makes the update response to changes in the key database directed. Signed-off-by: Saturneric <[email protected]>
Diffstat (limited to 'include/gpg/GpgContext.h')
-rw-r--r--include/gpg/GpgContext.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/include/gpg/GpgContext.h b/include/gpg/GpgContext.h
index 81ff3152..e8ae9feb 100644
--- a/include/gpg/GpgContext.h
+++ b/include/gpg/GpgContext.h
@@ -31,7 +31,7 @@
#include "GpgGenKeyInfo.h"
#include "GpgKey.h"
-typedef QLinkedList<GpgKey> GpgKeyList;
+using GpgKeyList = QLinkedList<GpgKey>;
class GpgImportedKey {
public:
@@ -82,15 +82,17 @@ namespace GpgME {
public:
GpgContext(); // Constructor
+
~GpgContext() override; // Destructor
+
GpgImportInformation importKey(QByteArray inBuffer);
+ const GpgKeyList &getKeys() const;
+
bool exportKeys(QStringList *uidList, QByteArray *outBuffer);
bool generateKey(GenKeyInfo *params);
- GpgKeyList listKeys();
-
void deleteKeys(QStringList *uidList);
bool encrypt(QStringList *uidList, const QByteArray &inBuffer,
@@ -104,9 +106,10 @@ namespace GpgME {
void getKeyDetails(const QString &uid, GpgKey& key);
+ void signKey(const QVector<GpgKey> &signer, const GpgKey &target, const QString& uid);
+
gpgme_signature_t verify(QByteArray *inBuffer, QByteArray *sigBuffer = nullptr);
-// void decryptVerify(QByteArray in);
bool sign(QStringList *uidList, const QByteArray &inBuffer, QByteArray *outBuffer, bool detached = false);
/**
@@ -158,6 +161,8 @@ namespace GpgME {
[[maybe_unused]] bool debug;
GpgKeyList mKeyList;
+ void fetch_keys();
+
static void checkErr(gpgme_error_t gpgmeError);
static void checkErr(gpgme_error_t gpgmeError, const QString &comment);