diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-05-28 15:31:35 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-05-28 15:31:35 +0100 |
| commit | 2ea95f432a4c12271354d2fa136c0832704e9244 (patch) | |
| tree | e2f234203f4b65e40e94a303e10940e3aae1952e /test | |
| parent | 0b3a3e461284b91e774f44c48f6f2f59b2a5832f (diff) | |
Modify KDM code to take a CPL disk file instead of a whole CPL object.
Diffstat (limited to 'test')
| -rw-r--r-- | test/encryption_test.cc | 5 | ||||
| -rw-r--r-- | test/round_trip_test.cc | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/test/encryption_test.cc b/test/encryption_test.cc index f08d4827..35e828b9 100644 --- a/test/encryption_test.cc +++ b/test/encryption_test.cc @@ -100,10 +100,13 @@ BOOST_AUTO_TEST_CASE (encryption) d.write_xml (false, xml_metadata, signer); + boost::filesystem::path cpl_path = boost::filesystem::path ("build/test/DCP/bar") / (cpl->id() + "_cpl.xml"); + libdcp::KDM kdm ( - cpl, + cpl_path, 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"), "libdcp", diff --git a/test/round_trip_test.cc b/test/round_trip_test.cc index a6ee2097..e5a22f60 100644 --- a/test/round_trip_test.cc +++ b/test/round_trip_test.cc @@ -68,12 +68,17 @@ BOOST_AUTO_TEST_CASE (round_trip_test) shared_ptr<libdcp::CPL> cpl (new libdcp::CPL (work_dir, "A Test DCP", libdcp::FEATURE, 24, 24)); cpl->add_reel (shared_ptr<libdcp::Reel> (new libdcp::Reel (asset_A, shared_ptr<libdcp::SoundAsset> (), shared_ptr<libdcp::SubtitleAsset> ()))); + libdcp::XMLMetadata metadata; + cpl->write_xml (true, metadata, signer); + + boost::filesystem::path cpl_path = work_dir / (cpl->id() + "_cpl.xml"); /* A KDM using our certificate chain's leaf key pair */ libdcp::KDM kdm_A ( - cpl, + cpl_path, 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"), "libdcp", |
