diff options
| author | ubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2010-01-31 18:46:08 +0100 |
|---|---|---|
| committer | ubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2010-01-31 18:46:08 +0100 |
| commit | 26d3bf7553f7d380753f7eafd99b5ae61c077be3 (patch) | |
| tree | 85deb90f8f5c1076cadec7defc9d27dbda537078 /context.cpp | |
| parent | also show properties of el-gamal key / version set to 0.2.2 (diff) | |
| download | gpg4usb-26d3bf7553f7d380753f7eafd99b5ae61c077be3.tar.gz gpg4usb-26d3bf7553f7d380753f7eafd99b5ae61c077be3.zip | |
recognize secret keys for keydetailsdialog
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@257 34ebc366-c3a9-4b3c-9f84-69acf7962910
Diffstat (limited to 'context.cpp')
| -rw-r--r-- | context.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/context.cpp b/context.cpp index b6a781e..cf1f64e 100644 --- a/context.cpp +++ b/context.cpp @@ -153,7 +153,13 @@ gpgme_key_t Context::getKeyDetails(QString uid) { gpgme_key_t key; - gpgme_get_key (mCtx, uid.toAscii().constData(), &key, 0); + // try secret + gpgme_get_key (mCtx, uid.toAscii().constData(), &key, 1); + // ok, its a public key + if(!key) { + gpgme_get_key (mCtx, uid.toAscii().constData(), &key, 0); + } + return key; } |
