summaryrefslogtreecommitdiff
path: root/src/kdm.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-03-19 09:30:38 +0000
committerCarl Hetherington <cth@carlh.net>2014-03-19 09:30:38 +0000
commitc91aa27e13703874c944fed763b5b039ceae71d2 (patch)
tree44ad2c16ba04371bb22bf068813f361a2fd6dcf4 /src/kdm.h
parent77b0ffe6c50796b8fb132f56394995e0df089713 (diff)
Partial tidy-up of KDM classes.
Diffstat (limited to 'src/kdm.h')
-rw-r--r--src/kdm.h32
1 files changed, 28 insertions, 4 deletions
diff --git a/src/kdm.h b/src/kdm.h
index 02395a72..2a340c35 100644
--- a/src/kdm.h
+++ b/src/kdm.h
@@ -32,11 +32,16 @@
class kdm_key_test;
+namespace xmlpp {
+ class Element;
+ class Attribute;
+}
+
namespace dcp {
namespace xml {
class DCinemaSecurityMessage;
-};
+}
class Signer;
class Certificate;
@@ -82,7 +87,7 @@ public:
);
KDMKey (KDMKey const &);
-
+
KDMKey& operator= (KDMKey const &);
/** @return ID of the CPL that the KDM is for */
@@ -189,11 +194,30 @@ public:
std::string as_xml () const;
private:
+ void authenticated_public (xmlpp::Element *, std::map<std::string, xmlpp::Attribute *>& references) const;
+ void authenticated_private (xmlpp::Element *, std::map<std::string, xmlpp::Attribute *>& references) const;
+ void signature (xmlpp::Element *, std::map<std::string, xmlpp::Attribute *> const & references) const;
+
/** Unencrypted MXF content keys */
std::list<KDMKey> _keys;
- /** The KDM's contents, mapped 1:1-ish to the XML */
- boost::shared_ptr<xml::DCinemaSecurityMessage> _xml_kdm;
+ /** AuthenticatedPublic/MessageId (without the urn:uuid: prefix) */
+ std::string _id;
+ /** AuthenticatedPublic/AnnotationText */
+ std::string _annotation_text;
+ /** AuthenticatedPublic/IssueDate */
+ std::string _issue_date;
+ /** Certificate of recipient */
+ boost::shared_ptr<const Certificate> _recipient_cert;
+ /** CPL that this KDM is for, or 0 if we do not have a CPL object */
+ boost::shared_ptr<const CPL> _cpl;
+ boost::shared_ptr<const Signer> _signer;
+ /** Start time for this KDM */
+ boost::posix_time::ptime _not_valid_before;
+ /** End time for this KDM */
+ boost::posix_time::ptime _not_valid_after;
+ /** KDMRequiredExtensions/AuthorizedDeviceInfo/DeviceListIdentifier */
+ std::string _device_list_identifier_id;
};