aboutsummaryrefslogtreecommitdiffstats
path: root/src/gpg/GpgConstants.cpp
diff options
context:
space:
mode:
authorSaturn&Eric <[email protected]>2022-01-05 20:02:19 +0000
committerGitHub <[email protected]>2022-01-05 20:02:19 +0000
commita3ca1bf1d4404327d68d3d49127085638c272152 (patch)
treedeb10c33977e5002fa6e9b434f2b07d2719a4e31 /src/gpg/GpgConstants.cpp
parentMerge pull request #37 from saturneric/document (diff)
parent<doc>(navbar): take repository and GitHub apart. (diff)
downloadGpgFrontend-a3ca1bf1d4404327d68d3d49127085638c272152.tar.gz
GpgFrontend-a3ca1bf1d4404327d68d3d49127085638c272152.zip
Merge pull request #36 from saturneric/developv2.0.4
v2.0.4
Diffstat (limited to 'src/gpg/GpgConstants.cpp')
-rw-r--r--src/gpg/GpgConstants.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gpg/GpgConstants.cpp b/src/gpg/GpgConstants.cpp
index fd3c56b4..100bf8f8 100644
--- a/src/gpg/GpgConstants.cpp
+++ b/src/gpg/GpgConstants.cpp
@@ -42,6 +42,10 @@ const char* GpgFrontend::GpgConstants::PGP_SIGNATURE_BEGIN =
"-----BEGIN PGP SIGNATURE-----";
const char* GpgFrontend::GpgConstants::PGP_SIGNATURE_END =
"-----END PGP SIGNATURE-----";
+const char* GpgFrontend::GpgConstants::PGP_PUBLIC_KEY_BEGIN =
+ "------BEGIN PGP PUBLIC KEY BLOCK-----";
+const char* GpgFrontend::GpgConstants::PGP_PRIVATE_KEY_BEGIN =
+ "-----BEGIN PGP PRIVATE KEY BLOCK-----";
const char* GpgFrontend::GpgConstants::GPG_FRONTEND_SHORT_CRYPTO_HEAD =
"GpgF_Scpt://";
@@ -215,6 +219,12 @@ GpgFrontend::GpgVerifyResult GpgFrontend::_new_result(
return {result, _result_ref_deletor()};
}
+GpgFrontend::GpgGenKeyResult GpgFrontend::_new_result(
+ gpgme_genkey_result_t&& result) {
+ gpgme_result_ref(result);
+ return {result, _result_ref_deletor()};
+}
+
void GpgFrontend::_result_ref_deletor::operator()(void* _result) {
DLOG(INFO) << _("Called") << _result;
if (_result != nullptr) gpgme_result_unref(_result);