aboutsummaryrefslogtreecommitdiffstats
path: root/src/gpg/GpgContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpg/GpgContext.cpp')
-rw-r--r--src/gpg/GpgContext.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gpg/GpgContext.cpp b/src/gpg/GpgContext.cpp
index e665fdea..c73d3d65 100644
--- a/src/gpg/GpgContext.cpp
+++ b/src/gpg/GpgContext.cpp
@@ -263,12 +263,16 @@ namespace GpgME {
gpgme_key_t key;
+ qDebug() << "Clear List and Map";
+
mKeyList.clear();
mKeyMap.clear();
auto &keys = mKeyList;
auto &keys_map = mKeyMap;
+ qDebug() << "Set Keylist Mode";
+
gpgmeError = gpgme_set_keylist_mode(mCtx,
GPGME_KEYLIST_MODE_LOCAL
| GPGME_KEYLIST_MODE_WITH_SECRET
@@ -280,16 +284,22 @@ namespace GpgME {
return;
}
+ qDebug() << "Operate KeyList Start";
+
gpgmeError = gpgme_op_keylist_start(mCtx, nullptr, 0);
if (gpg_err_code(gpgmeError) != GPG_ERR_NO_ERROR) {
checkErr(gpgmeError);
return;
}
+ qDebug() << "Start Loop";
+
while ((gpgmeError = gpgme_op_keylist_next(mCtx, &key)) == GPG_ERR_NO_ERROR) {
if (!key->subkeys)
continue;
+ qDebug() << "Append Key" << key->subkeys->keyid;
+
keys.append(GpgKey(key));
keys_map.insert(keys.back().id, &keys.back());
gpgme_key_unref(key);
@@ -301,6 +311,8 @@ namespace GpgME {
return;
}
+ qDebug() << "Operate KeyList End";
+
gpgmeError = gpgme_op_keylist_end(mCtx);
if (gpg_err_code(gpgmeError) != GPG_ERR_NO_ERROR) {
checkErr(gpgmeError);