aboutsummaryrefslogtreecommitdiffstats
path: root/src/gpg/function/GpgKeyGetter.cpp
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2022-01-03 18:33:35 +0000
committerSaturneric <[email protected]>2022-01-03 18:33:35 +0000
commit9a4fa7019dde788dd337f406dc2d52e4c94b696c (patch)
treec8582139ce865c6f1ab35291d6e36618e09e1131 /src/gpg/function/GpgKeyGetter.cpp
parent<feature>(ui): default sender gpg key settings in send mail. (diff)
downloadGpgFrontend-9a4fa7019dde788dd337f406dc2d52e4c94b696c.tar.gz
GpgFrontend-9a4fa7019dde788dd337f406dc2d52e4c94b696c.zip
<fix, feature>(core, ui): add key in smart card support.
1.fix problem that when key is in a smart card, the result of FetchKey() is not equal with which provided by GetKey().
Diffstat (limited to 'src/gpg/function/GpgKeyGetter.cpp')
-rw-r--r--src/gpg/function/GpgKeyGetter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gpg/function/GpgKeyGetter.cpp b/src/gpg/function/GpgKeyGetter.cpp
index 3457a8a7..248e5630 100644
--- a/src/gpg/function/GpgKeyGetter.cpp
+++ b/src/gpg/function/GpgKeyGetter.cpp
@@ -58,7 +58,8 @@ GpgFrontend::KeyLinkListPtr GpgFrontend::GpgKeyGetter::FetchKey() {
gpgme_key_t key;
while ((err = gpgme_op_keylist_next(ctx, &key)) == GPG_ERR_NO_ERROR) {
- keys_list->push_back(GpgKey(std::move(key)));
+ keys_list->push_back(GetKey(key->fpr));
+ auto& _key = keys_list->back();
}
assert(check_gpg_error_2_err_code(err, GPG_ERR_EOF) == GPG_ERR_EOF);