diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-01-29 00:07:10 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-02-11 22:26:38 +0100 |
| commit | e18630852de1ac02c23c74cbe7643845b6f4bd17 (patch) | |
| tree | 9860c35db04509b5edf818d4ad6667b0c59651de /test/import_dcp_test.cc | |
| parent | 6ca8f63ff524330bf58877ffe963466495e46758 (diff) | |
Cleanup: extract encrypt() call from Film::make_kdm().
Diffstat (limited to 'test/import_dcp_test.cc')
| -rw-r--r-- | test/import_dcp_test.cc | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/test/import_dcp_test.cc b/test/import_dcp_test.cc index e4545b7b0..acac79051 100644 --- a/test/import_dcp_test.cc +++ b/test/import_dcp_test.cc @@ -74,15 +74,11 @@ BOOST_AUTO_TEST_CASE (import_dcp_test) Config::instance()->set_decryption_chain (make_shared<dcp::CertificateChain>(openssl_path(), CERTIFICATE_VALIDITY_PERIOD)); - auto kdm = A->make_kdm ( - Config::instance()->decryption_chain()->leaf (), - vector<string>(), - A_dcp.cpls().front()->file().get(), - dcp::LocalTime ("2030-07-21T00:00:00+00:00"), - dcp::LocalTime ("2031-07-21T00:00:00+00:00"), - dcp::Formulation::MODIFIED_TRANSITIONAL_1, - true, 0 - ); + auto signer = Config::instance()->signer_chain(); + BOOST_REQUIRE(signer->valid()); + + auto const decrypted_kdm = A->make_kdm(A_dcp.cpls().front()->file().get(), dcp::LocalTime ("2030-07-21T00:00:00+00:00"), dcp::LocalTime ("2031-07-21T00:00:00+00:00")); + auto const kdm = decrypted_kdm.encrypt(signer, Config::instance()->decryption_chain()->leaf(), {}, dcp::Formulation::MODIFIED_TRANSITIONAL_1, true, 0); auto B = new_test_film ("import_dcp_test2"); B->set_container (Ratio::from_id ("185")); |
