From 9a4fa7019dde788dd337f406dc2d52e4c94b696c Mon Sep 17 00:00:00 2001 From: Saturneric Date: Tue, 4 Jan 2022 02:33:35 +0800 Subject: (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(). --- src/gpg/function/GpgKeyGetter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/gpg/function/GpgKeyGetter.cpp') 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); -- cgit v1.2.3