diff options
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; } |