diff options
author | Saturneric <[email protected]> | 2021-05-21 16:15:54 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2021-05-21 16:15:54 +0000 |
commit | 21f4730e92d088c06dea01684f3f736f3f9beff0 (patch) | |
tree | c1dc4dc6836903adc688b03cafabc06fc845743f /src/gpg/GpgContext.cpp | |
parent | Modified KeyList and Add Usage Support; (diff) | |
download | GpgFrontend-21f4730e92d088c06dea01684f3f736f3f9beff0.tar.gz GpgFrontend-21f4730e92d088c06dea01684f3f736f3f9beff0.zip |
Expand Key Details Dialog;
Expand and Improve GpgKey and GpgSubKey;
Change Interface getKeyDetails();
Code Modified;
Signed-off-by: Saturneric <[email protected]>
Diffstat (limited to '')
-rw-r--r-- | src/gpg/GpgContext.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/gpg/GpgContext.cpp b/src/gpg/GpgContext.cpp index a423cfbf..f7a7ea5c 100644 --- a/src/gpg/GpgContext.cpp +++ b/src/gpg/GpgContext.cpp @@ -31,12 +31,6 @@ #include <windows.h> #endif -const QVector<QString> GenKeyInfo::SupportedKeyAlgo = { - "RSA", - "DSA", - "ED25519" -}; - namespace GpgME { /** Constructor @@ -259,16 +253,17 @@ namespace GpgME { return true; } - gpgme_key_t GpgContext::getKeyDetails(const QString& uid) { - gpgme_key_t key; + void GpgContext::getKeyDetails(const QString& uid, GpgKey& key) { + gpgme_key_t gpgme_key; // try secret - gpgme_get_key(mCtx, uid.toUtf8().constData(), &key, 1); + gpgme_get_key(mCtx, uid.toUtf8().constData(), &gpgme_key, 1); // ok, its a public key - if (!key) { - gpgme_get_key(mCtx, uid.toUtf8().constData(), &key, 0); + if (!gpgme_key) { + gpgme_get_key(mCtx, uid.toUtf8().constData(), &gpgme_key, 0); } - return key; + + key.parse(gpgme_key); } /** List all availabe Keys (VERY much like kgpgme) |