diff options
author | ubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2012-08-07 10:45:21 +0000 |
---|---|---|
committer | ubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2012-08-07 10:45:21 +0000 |
commit | 865aaaed3fd163ba4c347a08f34780933bcda949 (patch) | |
tree | ab0b51c9030a8b904e3352786159f3810b9ee74e /gpgcontext.cpp | |
parent | some work on verify (diff) | |
download | gpg4usb-865aaaed3fd163ba4c347a08f34780933bcda949.tar.gz gpg4usb-865aaaed3fd163ba4c347a08f34780933bcda949.zip |
fix secret key export0.3.2-mac
git-svn-id: http://cpunk.de/svn/src/gpg4usb/branches/0.3.2-mac@944 34ebc366-c3a9-4b3c-9f84-69acf7962910
Diffstat (limited to 'gpgcontext.cpp')
-rw-r--r-- | gpgcontext.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/gpgcontext.cpp b/gpgcontext.cpp index 677c2c5..2d98372 100644 --- a/gpgcontext.cpp +++ b/gpgcontext.cpp @@ -197,18 +197,21 @@ bool GpgContext::exportKeys(QStringList *uidList, QByteArray *outBuffer) KgpgCore::KgpgKey GpgContext::getKeyDetails(QString uid) { - //KgpgCore::KgpgKey key; + // try secret - /*qDebug() << "blubb"; - KgpgCore::KgpgKey key = KgpgInterface::readSecretKeys(QStringList() << uid).first(); + KgpgCore::KgpgKeyList keys = KgpgInterface::readSecretKeys(QStringList() << uid); + if(keys.empty()) { + // ok try public + keys = KgpgInterface::readPublicKeys(QStringList() << uid); + // that should not happen + /*if(keys.empty()) { + qDebug() << "error, no key with uid" << uid; + return ; + }*/ - qDebug() << "bla"; - qDebug() << "id: " << key.id(); + } - // ok, its a public key - if (key.id() == "") {*/ - KgpgCore::KgpgKey key = KgpgInterface::readPublicKeys(QStringList() << uid).first(); - //} + KgpgCore::KgpgKey key = keys.first(); return key; } |