aboutsummaryrefslogtreecommitdiffstats
path: root/lang/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'lang/cpp/src')
-rw-r--r--lang/cpp/src/key.cpp16
-rw-r--r--lang/cpp/src/key.h4
2 files changed, 20 insertions, 0 deletions
diff --git a/lang/cpp/src/key.cpp b/lang/cpp/src/key.cpp
index e2d91a10..5108a6ee 100644
--- a/lang/cpp/src/key.cpp
+++ b/lang/cpp/src/key.cpp
@@ -777,6 +777,22 @@ const char *UserID::remark(const Key &remarker, Error &err) const
return nullptr;
}
+std::vector<std::string> UserID::remarks(std::vector<Key> keys, Error &err) const
+{
+ std::vector<std::string> ret;
+
+ for (const auto &key: keys) {
+ const char *rem = remark(key, err);
+ if (err) {
+ return ret;
+ }
+ if (rem) {
+ ret.push_back(rem);
+ }
+ }
+ return ret;
+}
+
//
//
// class Signature
diff --git a/lang/cpp/src/key.h b/lang/cpp/src/key.h
index cca3c7a6..cf4e9054 100644
--- a/lang/cpp/src/key.h
+++ b/lang/cpp/src/key.h
@@ -430,6 +430,10 @@ public:
const char *remark(const Key &key,
Error &error) const;
+ /*! Get multiple remarks made by potentially multiple keys. */
+ std::vector <std::string> remarks(std::vector<GpgME::Key> remarkers,
+ Error &error) const;
+
private:
shared_gpgme_key_t key;
gpgme_user_id_t uid;