aboutsummaryrefslogtreecommitdiffstats
path: root/src/gpg/model/GpgKey.h
diff options
context:
space:
mode:
authorSaturn&Eric <[email protected]>2021-12-16 21:20:56 +0000
committerGitHub <[email protected]>2021-12-16 21:20:56 +0000
commit52ac9979bd8c4820a0034d619cb7d1d3e4105d8b (patch)
treec7524432467825603d83a17f398249d431c28b18 /src/gpg/model/GpgKey.h
parentMerge pull request #32 from saturneric/develop (diff)
parentFixed bugs & Improve Speed. (diff)
downloadGpgFrontend-52ac9979bd8c4820a0034d619cb7d1d3e4105d8b.tar.gz
GpgFrontend-52ac9979bd8c4820a0034d619cb7d1d3e4105d8b.zip
Merge pull request #34 from saturneric/develop
v2.0.3
Diffstat (limited to '')
-rw-r--r--src/gpg/model/GpgKey.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gpg/model/GpgKey.h b/src/gpg/model/GpgKey.h
index 3bebcd41..fb7d5735 100644
--- a/src/gpg/model/GpgKey.h
+++ b/src/gpg/model/GpgKey.h
@@ -144,6 +144,12 @@ class GpgKey {
explicit operator gpgme_key_t() const { return _key_ref.get(); }
+ [[nodiscard]] GpgKey copy() const {
+ gpgme_key_ref(_key_ref.get());
+ auto* _new_key_ref = _key_ref.get();
+ return GpgKey(std::move(_new_key_ref));
+ }
+
private:
struct _key_ref_deletor {
void operator()(gpgme_key_t _key) {