aboutsummaryrefslogtreecommitdiffstats
path: root/gpgcontext.cpp
diff options
context:
space:
mode:
authorubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910>2012-08-02 22:08:46 +0000
committerubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910>2012-08-02 22:08:46 +0000
commit527a227714538c2aaf4bf37f7593b680b7aea85a (patch)
tree592b3650449f96558a2dc80430a06d675cc36748 /gpgcontext.cpp
parentmark private keys works again (diff)
downloadgpg4usb-527a227714538c2aaf4bf37f7593b680b7aea85a.tar.gz
gpg4usb-527a227714538c2aaf4bf37f7593b680b7aea85a.zip
getKeyDetails kind of works
git-svn-id: http://cpunk.de/svn/src/gpg4usb/branches/0.3.2-mac@927 34ebc366-c3a9-4b3c-9f84-69acf7962910
Diffstat (limited to 'gpgcontext.cpp')
-rw-r--r--gpgcontext.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/gpgcontext.cpp b/gpgcontext.cpp
index e6666f3..8de7d9c 100644
--- a/gpgcontext.cpp
+++ b/gpgcontext.cpp
@@ -194,7 +194,7 @@ bool GpgContext::exportKeys(QStringList *uidList, QByteArray *outBuffer)
return true;
}
-gpgme_key_t GpgContext::getKeyDetails(QString uid)
+/*gpgme_key_t GpgContext::getKeyDetails(QString uid)
{
gpgme_key_t key;
@@ -205,6 +205,20 @@ gpgme_key_t GpgContext::getKeyDetails(QString uid)
gpgme_get_key(mCtx, uid.toAscii().constData(), &key, 0);
}
return key;
+}*/
+
+KgpgCore::KgpgKey GpgContext::getKeyDetails(QString uid) {
+
+ //KgpgCore::KgpgKey key;
+ // try secret
+ KgpgCore::KgpgKey key = KgpgInterface::readSecretKeys(QStringList() << uid).first();
+
+ // ok, its a public key
+ if (key.id() == "") {
+ KgpgCore::KgpgKey key = KgpgInterface::readPublicKeys(QStringList() << uid).first();
+ }
+ return key;
+
}