diff options
author | Andre Heinecke <[email protected]> | 2017-01-11 15:14:45 +0000 |
---|---|---|
committer | Andre Heinecke <[email protected]> | 2017-01-11 15:14:45 +0000 |
commit | e416f9961837039f259558edf41fccbc181ad128 (patch) | |
tree | cda46bb7f429259f65dc11af864f23922f4785c1 /lang/cpp/src/key.h | |
parent | Fix Qgpgme build for macos (diff) | |
download | gpgme-e416f9961837039f259558edf41fccbc181ad128.tar.gz gpgme-e416f9961837039f259558edf41fccbc181ad128.zip |
cpp: Add revuid and adduid support
* lang/cpp/src/context.cpp
(Context::revUid, Context::startRevUid),
(Context::addUid, Context::startAddUid): New.
* lang/cpp/src/context.h: Declare new functions.
* lang/cpp/src/key.cpp (Key::UserID::revoke)
(Key::addUid): Idomatic helpers.
lang/cpp/src/key.h: Declare new functions.
* NEWS: Update accordingly.
Diffstat (limited to '')
-rw-r--r-- | lang/cpp/src/key.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lang/cpp/src/key.h b/lang/cpp/src/key.h index 3f596a82..b0599c7f 100644 --- a/lang/cpp/src/key.h +++ b/lang/cpp/src/key.h @@ -152,6 +152,17 @@ public: * how long the keylisting takes.*/ void update(); + /** + * @brief Add a user id to this key. + * + * Needs gnupg 2.1.13 and the key needs to be updated + * afterwards to see the new uid. + * + * @param uid should be fully formated and UTF-8 encoded. + * + * @returns a possible error. + **/ + Error addUid(const char *uid); private: gpgme_key_t impl() const { @@ -335,6 +346,13 @@ public: * @returns a normalized mail address for this userid * or an empty string. */ std::string addrSpec() const; + + /*! Revoke the user id. + * + * Key needs update afterwards. + * + * @returns an error on error.*/ + Error revoke(); private: shared_gpgme_key_t key; gpgme_user_id_t uid; |