summaryrefslogtreecommitdiff
path: root/test/atmos_test.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-01-29 00:07:10 +0100
committerCarl Hetherington <cth@carlh.net>2023-02-11 22:26:38 +0100
commite18630852de1ac02c23c74cbe7643845b6f4bd17 (patch)
tree9860c35db04509b5edf818d4ad6667b0c59651de /test/atmos_test.cc
parent6ca8f63ff524330bf58877ffe963466495e46758 (diff)
Cleanup: extract encrypt() call from Film::make_kdm().
Diffstat (limited to 'test/atmos_test.cc')
-rw-r--r--test/atmos_test.cc15
1 files changed, 5 insertions, 10 deletions
diff --git a/test/atmos_test.cc b/test/atmos_test.cc
index c2b0cb6d8..170736825 100644
--- a/test/atmos_test.cc
+++ b/test/atmos_test.cc
@@ -74,16 +74,11 @@ BOOST_AUTO_TEST_CASE (atmos_encrypted_passthrough_test)
BOOST_REQUIRE (!mxf_atmos_files_same(ref, dcp_file(film, "atmos")));
- auto kdm = film->make_kdm (
- Config::instance()->decryption_chain()->leaf(),
- vector<string>(),
- dcp_file(film, "cpl"),
- dcp::LocalTime(),
- dcp::LocalTime(),
- dcp::Formulation::MODIFIED_TRANSITIONAL_1,
- false,
- optional<int>()
- );
+ auto signer = Config::instance()->signer_chain();
+ BOOST_REQUIRE(signer->valid());
+
+ auto const decrypted_kdm = film->make_kdm(dcp_file(film, "cpl"), dcp::LocalTime(), dcp::LocalTime());
+ auto const kdm = decrypted_kdm.encrypt(signer, Config::instance()->decryption_chain()->leaf(), {}, dcp::Formulation::MODIFIED_TRANSITIONAL_1, false, {});
auto content2 = make_shared<DCPContent>(film->dir(film->dcp_name()));
content2->add_kdm (kdm);