Add AudioMapping::take_from().
[dcpomatic.git] / test / import_dcp_test.cc
index e759289bee878b621f3d1bff76496d1c7a1719e0..acac790513ea6480b747a18dee64be26d37496b5 100644 (file)
@@ -47,7 +47,6 @@
 using std::dynamic_pointer_cast;
 using std::make_shared;
 using std::map;
-using std::shared_ptr;
 using std::string;
 using std::vector;
 
@@ -75,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"));