aboutsummaryrefslogtreecommitdiffstats
path: root/lang/cpp/src/context.h
diff options
context:
space:
mode:
authorIngo Klöcker <[email protected]>2024-08-06 13:32:20 +0000
committerIngo Klöcker <[email protected]>2024-08-06 15:56:43 +0000
commitd5f612e9685d18313d445799a19ff83e013f1b0a (patch)
tree3f71490833fe5fbfc7aedd375f1ff0d6201cae32 /lang/cpp/src/context.h
parentcore: New function gpgme_op_setownertrust (diff)
downloadgpgme-d5f612e9685d18313d445799a19ff83e013f1b0a.tar.gz
gpgme-d5f612e9685d18313d445799a19ff83e013f1b0a.zip
cpp: Add support for setting owner trust and for disabling keys
* lang/cpp/src/context.cpp, lang/cpp/src/context.h (class Context): Add member functions setOwnerTrust, startSetOwnerTrust, setKeyEnabled, startSetKeyEnabled. * lang/cpp/src/context.cpp (owner_trust_to_string): New. -- GnuPG-bug-id: 7239
Diffstat (limited to '')
-rw-r--r--lang/cpp/src/context.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/lang/cpp/src/context.h b/lang/cpp/src/context.h
index c4f968f4..e2c73b64 100644
--- a/lang/cpp/src/context.h
+++ b/lang/cpp/src/context.h
@@ -319,6 +319,28 @@ public:
const std::vector<Subkey> &subkeys = std::vector<Subkey>(),
const SetExpireFlags flags = SetExpireDefault);
+ /**
+ * Sets the owner trust of the key \a key to the value \a trust.
+ * Requires gpg 2.4.6.
+ */
+ Error setOwnerTrust(const Key &key, Key::OwnerTrust trust);
+ /**
+ * Starts the operation to set the owner trust of the key \a key to the value \a trust.
+ * Requires gpg 2.4.6.
+ */
+ Error startSetOwnerTrust(const Key &key, Key::OwnerTrust trust);
+
+ /**
+ * Enables or disables the key \a key.
+ * Requires gpg 2.4.6.
+ */
+ Error setKeyEnabled(const Key &key, bool enabled);
+ /**
+ * Starts the operation to enable or disable the key \a key.
+ * Requires gpg 2.4.6.
+ */
+ Error startSetKeyEnabled(const Key &key, bool enabled);
+
Error revokeSignature(const Key &key, const Key &signingKey,
const std::vector<UserID> &userIds = std::vector<UserID>());
Error startRevokeSignature(const Key &key, const Key &signingKey,