aboutsummaryrefslogtreecommitdiffstats
path: root/context.cpp
diff options
context:
space:
mode:
authorubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910>2010-01-13 23:55:04 +0000
committerubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910>2010-01-13 23:55:04 +0000
commit8de2c952ca87ec5d249d9ebdccd6c75972424f82 (patch)
treea86b802b799ea5974d900df02d78cb858e9ba621 /context.cpp
parentupdated todo (diff)
downloadgpg4usb-8de2c952ca87ec5d249d9ebdccd6c75972424f82.tar.gz
gpg4usb-8de2c952ca87ec5d249d9ebdccd6c75972424f82.zip
start on keydetailsdialog
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@242 34ebc366-c3a9-4b3c-9f84-69acf7962910
Diffstat (limited to 'context.cpp')
-rw-r--r--context.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/context.cpp b/context.cpp
index 1d32000..af3df86 100644
--- a/context.cpp
+++ b/context.cpp
@@ -48,6 +48,7 @@ Context::Context()
setlocale(LC_ALL, "");
/** set locale, because tests do also */
gpgme_set_locale(NULL, LC_CTYPE, setlocale(LC_CTYPE, NULL));
+ //qDebug() << "Locale set to" << LC_CTYPE << " - " << setlocale(LC_CTYPE, NULL);
#ifndef _WIN32
gpgme_set_locale(NULL, LC_MESSAGES, setlocale(LC_MESSAGES, NULL));
#endif
@@ -148,6 +149,26 @@ bool Context::exportKeys(QList<QString> *uidList, QByteArray *outBuffer)
return true;
}
+gpgme_key_t Context::getKeyDetails(QString uid)
+{
+ gpgme_error_t err;
+ gpgme_key_t key;
+
+ /*gpgme_op_keylist_start (mCctx, uid.toAscii().constData(), 0);
+ gpgme_op_keylist_next (mCtx, &key);
+ qDebug() << key->subkeys->keyid);
+ if (key->uids && key->uids->name)
+ qDebug() << key->uids->name;
+ if (key->uids && key->uids->email)
+ qDebug() << key->uids->email;
+ gpgme_key_release (key);*/
+ gpgme_get_key (mCtx, uid.toAscii().constData(), &key, 1);
+
+
+ return key;
+
+}
+
/** List all availabe Keys (VERY much like kgpgme)
*/
GpgKeyList Context::listKeys()