From 83ecf1686a9a4e7de3a7b176cf272d9f9f640445 Mon Sep 17 00:00:00 2001 From: Andre Heinecke Date: Tue, 29 Oct 2019 16:24:01 +0100 Subject: cpp: Add convenience API to obtain remarks * lang/cpp/src/key.h, lang/cpp/src/key.cpp (UserID::remark): New. -- A remark made by one key on another is a signature notation on a user id certification signature with the name "rem@gnupg.org". This helps with: GnuPG-Bug-Id: T4734 --- lang/cpp/src/key.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'lang/cpp/src/key.h') diff --git a/lang/cpp/src/key.h b/lang/cpp/src/key.h index dd855aec..cca3c7a6 100644 --- a/lang/cpp/src/key.h +++ b/lang/cpp/src/key.h @@ -413,6 +413,23 @@ public: * * @returns the last update time. */ time_t lastUpdate() const; + + /*! Get a remark made by the key provided. + * A remark is a signature notation on + * this user id made by the key with the + * name "rem@gnupg.org". Returns an error if the + * parent key of this user id was not listed with the + * keylist mode flags for signatures and signature notations. + * + * @param key The key for which comments should be searched. + * @param error Set to GPG_ERR_NO_DATA if the keylist did + * not include signature notations. + * + * @returns The value of the comment or NULL if none exists. + **/ + const char *remark(const Key &key, + Error &error) const; + private: shared_gpgme_key_t key; gpgme_user_id_t uid; -- cgit v1.2.3