X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=test%2Fremake_id_test.cc;h=816a43feb04186c2e23f46524a70f0d455bae0d5;hb=f0a03cacb2f2214b7452e42f2dec465888422e6f;hp=d2cd54d88a2c875b4016851fea618ac5b142dad8;hpb=b1e22dff981fb86ae04b12bb5a064e61030793a8;p=dcpomatic.git diff --git a/test/remake_id_test.cc b/test/remake_id_test.cc index d2cd54d88..816a43feb 100644 --- a/test/remake_id_test.cc +++ b/test/remake_id_test.cc @@ -19,24 +19,23 @@ */ -#include "lib/ffmpeg_content.h" +#include "lib/config.h" #include "lib/content_factory.h" -#include "lib/text_content.h" -#include "lib/job_manager.h" -#include "lib/film.h" #include "lib/dcp_content.h" #include "lib/examine_content_job.h" -#include "lib/config.h" +#include "lib/ffmpeg_content.h" +#include "lib/film.h" +#include "lib/job_manager.h" +#include "lib/text_content.h" #include "test.h" #include #include -using std::string; -using std::vector; -using std::shared_ptr; using std::dynamic_pointer_cast; using std::make_shared; +using std::string; +using std::vector; using boost::optional; @@ -85,17 +84,12 @@ BOOST_AUTO_TEST_CASE (remake_id_test2) } BOOST_REQUIRE(cpl); + auto signer = Config::instance()->signer_chain(); + BOOST_REQUIRE(signer->valid()); + /* Make a DKDM */ - auto kdm = film->make_kdm ( - Config::instance()->decryption_chain()->leaf(), - vector(), - *cpl, - dcp::LocalTime ("2030-01-01T01:00:00+00:00"), - dcp::LocalTime ("2031-01-01T01:00:00+00:00"), - dcp::Formulation::MODIFIED_TRANSITIONAL_1, - true, - 0 - ); + auto const decrypted_kdm = film->make_kdm(*cpl, dcp::LocalTime ("2030-01-01T01:00:00+00:00"), dcp::LocalTime ("2031-01-01T01:00:00+00:00")); + auto const kdm = decrypted_kdm.encrypt(signer, Config::instance()->decryption_chain()->leaf(), {}, dcp::Formulation::MODIFIED_TRANSITIONAL_1, true, 0); /* Import the DCP into a new film */ auto dcp_content = make_shared(film->dir(film->dcp_name()));