aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/model/GpgKey.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2025-04-12 23:03:57 +0000
committersaturneric <[email protected]>2025-04-12 23:03:57 +0000
commit571cfb16ccfd7ac6bc59b5acc77a94d0bdcf0990 (patch)
treea4efe7ba4d5344897c60513c03172d5de0191658 /src/core/model/GpgKey.cpp
parentfix: upgrade to gpgme 1.24.2 (diff)
downloadGpgFrontend-571cfb16ccfd7ac6bc59b5acc77a94d0bdcf0990.tar.gz
GpgFrontend-571cfb16ccfd7ac6bc59b5acc77a94d0bdcf0990.zip
feat: add openpgp smart card support
Diffstat (limited to 'src/core/model/GpgKey.cpp')
-rw-r--r--src/core/model/GpgKey.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/model/GpgKey.cpp b/src/core/model/GpgKey.cpp
index 6608d885..3efb53fc 100644
--- a/src/core/model/GpgKey.cpp
+++ b/src/core/model/GpgKey.cpp
@@ -37,6 +37,9 @@ GpgKey::GpgKey(gpgme_key_t key)
if (ptr != nullptr) gpgme_key_unref(ptr);
}) {}
+GpgKey::GpgKey(QSharedPointer<struct _gpgme_key> key_ref)
+ : key_ref_(std::move(key_ref)) {}
+
GpgKey::operator gpgme_key_t() const { return key_ref_.get(); }
GpgKey::GpgKey(const GpgKey &) = default;
@@ -218,4 +221,5 @@ auto GpgKey::PrimaryKey() const -> GpgSubKey {
}
auto GpgKey::IsSubKey() const -> bool { return false; }
+
} // namespace GpgFrontend \ No newline at end of file