summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-09-24 18:54:09 +0100
committerCarl Hetherington <cth@carlh.net>2013-09-24 18:54:09 +0100
commit725c1f0ead60e73e9dbc17337c416ac4d2720c55 (patch)
tree132b82fbdb44320e74289ee6400c4a39d162439e /test
parentb0b83d69f38a8239f3df1e2872b6cfebf9f84af8 (diff)
Various KDM work.
Diffstat (limited to 'test')
-rw-r--r--test/encryption_test.cc9
-rw-r--r--test/kdm_test.cc3
2 files changed, 7 insertions, 5 deletions
diff --git a/test/encryption_test.cc b/test/encryption_test.cc
index 6e4a61d6..961d281b 100644
--- a/test/encryption_test.cc
+++ b/test/encryption_test.cc
@@ -17,6 +17,8 @@
*/
+#include "kdm.h"
+
/* Load a certificate chain from build/test/data/ *.pem and then build
an encrypted DCP and a KDM using it.
*/
@@ -87,17 +89,16 @@ BOOST_AUTO_TEST_CASE (encryption)
d.write_xml (false, xml_metadata, signer);
- shared_ptr<xmlpp::Document> kdm = cpl->make_kdm (
+ libdcp::KDM kdm (
+ cpl,
signer,
signer->certificates().leaf(),
- key,
boost::posix_time::time_from_string ("2013-01-01 00:00:00"),
boost::posix_time::time_from_string ("2013-01-08 00:00:00"),
- false,
mxf_metadata,
xml_metadata
);
- kdm->write_to_file_formatted ("build/test/bar.kdm.xml", "UTF-8");
+ kdm.as_xml ("build/test/bar.kdm.xml");
system ("xmllint --path schema --nonet --noout --schema schema/SMPTE-430-1-2006-Amd-1-2009-KDM.xsd build/test/bar.kdm.xml");
}
diff --git a/test/kdm_test.cc b/test/kdm_test.cc
index 5d071074..d9ba3745 100644
--- a/test/kdm_test.cc
+++ b/test/kdm_test.cc
@@ -51,7 +51,8 @@ BOOST_AUTO_TEST_CASE (kdm_passthrough_test)
"test/data/kdm_TONEPLATES-SMPTE-ENC_.smpte-430-2.ROOT.NOT_FOR_PRODUCTION_20130706_20230702_CAR_OV_t1_8971c838.xml"
);
- kdm.as_xml ("build/kdm.xml");
+ shared_ptr<xmlpp::Document> doc = kdm.as_xml ();
+ doc->write_to_file_formatted ("build/kdm.xml", "UTF-8");
int const r = system (
"xmldiff -c test/data/kdm_TONEPLATES-SMPTE-ENC_.smpte-430-2.ROOT.NOT_FOR_PRODUCTION_20130706_20230702_CAR_OV_t1_8971c838.xml build/kdm.xml"
);