summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-09-24 20:04:11 +0100
committerCarl Hetherington <cth@carlh.net>2013-09-24 20:04:11 +0100
commitfa507ea166b8339bcf029ca73a487e7553fb5eb6 (patch)
tree529e2de7ccf97527a5f6e6ed3ada0fba99341341
parent1bf16b70c531b6b819a8339af395ff2a3c1e8977 (diff)
Simplify KDM API slightly.
-rw-r--r--src/kdm.cc6
-rw-r--r--src/kdm.h2
-rw-r--r--test/encryption_test.cc4
3 files changed, 6 insertions, 6 deletions
diff --git a/src/kdm.cc b/src/kdm.cc
index b9e598b9..dde5db1c 100644
--- a/src/kdm.cc
+++ b/src/kdm.cc
@@ -89,7 +89,7 @@ KDM::KDM (boost::filesystem::path kdm, boost::filesystem::path private_key)
KDM::KDM (
shared_ptr<const CPL> cpl, shared_ptr<const Signer> signer, shared_ptr<const Certificate> recipient_cert,
boost::posix_time::ptime not_valid_before, boost::posix_time::ptime not_valid_after,
- MXFMetadata mxf_metadata, XMLMetadata xml_metadata
+ string annotation_text, string issue_date
)
: xml_kdm (new xml::DCinemaSecurityMessage)
{
@@ -99,8 +99,8 @@ KDM::KDM (
apu.message_id = "urn:uuid:" + make_uuid ();
apu.message_type = "http://www.smpte-ra.org/430-1/2006/KDM#kdm-key-type";
- apu.annotation_text = mxf_metadata.product_name;
- apu.issue_date = xml_metadata.issue_date;
+ apu.annotation_text = annotation_text;
+ apu.issue_date = issue_date;
apu.signer.x509_issuer_name = signer->certificates().leaf()->issuer ();
apu.signer.x509_serial_number = signer->certificates().leaf()->serial ();
apu.recipient.x509_issuer_serial.x509_issuer_name = recipient_cert->issuer ();
diff --git a/src/kdm.h b/src/kdm.h
index 90ed3b9c..cee9db21 100644
--- a/src/kdm.h
+++ b/src/kdm.h
@@ -99,7 +99,7 @@ public:
KDM (
boost::shared_ptr<const CPL> cpl, boost::shared_ptr<const Signer>, boost::shared_ptr<const Certificate> recipient_cert,
boost::posix_time::ptime not_valid_before, boost::posix_time::ptime not_valid_after,
- MXFMetadata mxf_metadata, XMLMetadata xml_metadata
+ std::string annotation_text, std::string issue_date
);
std::list<KDMKey> keys () const {
diff --git a/test/encryption_test.cc b/test/encryption_test.cc
index 961d281b..60177438 100644
--- a/test/encryption_test.cc
+++ b/test/encryption_test.cc
@@ -95,8 +95,8 @@ BOOST_AUTO_TEST_CASE (encryption)
signer->certificates().leaf(),
boost::posix_time::time_from_string ("2013-01-01 00:00:00"),
boost::posix_time::time_from_string ("2013-01-08 00:00:00"),
- mxf_metadata,
- xml_metadata
+ "libdcp",
+ "2012-07-17T04:45:18+00:00"
);
kdm.as_xml ("build/test/bar.kdm.xml");