diff options
Diffstat (limited to 'include/gpg/GpgContext.h')
-rw-r--r-- | include/gpg/GpgContext.h | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/include/gpg/GpgContext.h b/include/gpg/GpgContext.h index e8ae9feb..92a8200c 100644 --- a/include/gpg/GpgContext.h +++ b/include/gpg/GpgContext.h @@ -60,14 +60,14 @@ public: } int considered; - [[maybe_unused]] int no_user_id; + int no_user_id; int imported; - [[maybe_unused]] int imported_rsa; + int imported_rsa; int unchanged; - [[maybe_unused]] int new_user_ids; - [[maybe_unused]] int new_sub_keys; - [[maybe_unused]] int new_signatures; - [[maybe_unused]] int new_revocations; + int new_user_ids; + int new_sub_keys; + int new_signatures; + int new_revocations; int secret_read; int secret_imported; int secret_unchanged; @@ -81,13 +81,13 @@ namespace GpgME { Q_OBJECT public: - GpgContext(); // Constructor + GpgContext(); - ~GpgContext() override; // Destructor + ~GpgContext() override; GpgImportInformation importKey(QByteArray inBuffer); - const GpgKeyList &getKeys() const; + [[nodiscard]] const GpgKeyList &getKeys() const; bool exportKeys(QStringList *uidList, QByteArray *outBuffer); @@ -106,6 +106,8 @@ namespace GpgME { void getKeyDetails(const QString &uid, GpgKey& key); + void getSigners(QVector<GpgKey> &signer); + void signKey(const QVector<GpgKey> &signer, const GpgKey &target, const QString& uid); gpgme_signature_t verify(QByteArray *inBuffer, QByteArray *sigBuffer = nullptr); @@ -151,16 +153,17 @@ namespace GpgME { private: gpgme_ctx_t mCtx{}; gpgme_data_t in{}; - [[maybe_unused]] gpgme_data_t out{}; gpgme_error_t err; + bool debug; static gpgme_error_t readToBuffer(gpgme_data_t dataIn, QByteArray *outBuffer); QByteArray mPasswordCache; QSettings settings; - [[maybe_unused]] bool debug; GpgKeyList mKeyList; + QMap<QString, GpgKey> mKeyMap; + void fetch_keys(); static void checkErr(gpgme_error_t gpgmeError); |