summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMart Jansink <mart@gofilex.nl>2018-02-14 11:13:13 +0100
committerCarl Hetherington <cth@carlh.net>2018-02-14 22:16:07 +0000
commit730ba2273b136ad5a3bfc1a185d69e6cc50a65af (patch)
treea30b41fdb0a4a5207fb95dd85f09d0f3ba60b4ba
parent0178ec5152c57e1ef9c3cb08ceac87537b2162a5 (diff)
Make an encrypted KDM's id publicly available.
-rw-r--r--src/encrypted_kdm.cc6
-rw-r--r--src/encrypted_kdm.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/src/encrypted_kdm.cc b/src/encrypted_kdm.cc
index 8030246f..7286f2d7 100644
--- a/src/encrypted_kdm.cc
+++ b/src/encrypted_kdm.cc
@@ -677,6 +677,12 @@ EncryptedKDM::keys () const
return _data->authenticated_private.encrypted_key;
}
+string
+EncryptedKDM::id () const
+{
+ return _data->authenticated_public.message_id;
+}
+
optional<string>
EncryptedKDM::annotation_text () const
{
diff --git a/src/encrypted_kdm.h b/src/encrypted_kdm.h
index 1605d911..69b9a267 100644
--- a/src/encrypted_kdm.h
+++ b/src/encrypted_kdm.h
@@ -86,6 +86,7 @@ public:
*/
std::list<std::string> keys () const;
+ std::string id () const;
boost::optional<std::string> annotation_text () const;
std::string content_title_text () const;
std::string issue_date () const;