Add verifier check for the actual asset file's ID not being the same as the one in...
[libdcp.git] / test / decryption_test.cc
index 5a8e57a4076cb05e600ced5f8335b5b550f7294f..1e2ca94beedb4a10e2373d05449ad20ce6fd20af 100644 (file)
@@ -136,7 +136,7 @@ BOOST_AUTO_TEST_CASE (failing_kdm_test)
 {
        dcp::DecryptedKDM kdm (
                dcp::EncryptedKDM (dcp::file_to_string ("test/data/target.pem.crt.de5d4eba-e683-41ca-bdda-aa4ad96af3f4.kdm.xml")),
-               dcp::file_to_string ("test/data/private.key")
+               dcp::file_to_string("test/data/failing-private.key")
                );
 }
 
@@ -155,7 +155,7 @@ BOOST_AUTO_TEST_CASE (decryption_test2)
        auto picture_asset = std::make_shared<dcp::MonoPictureAsset>(dcp::Fraction(24, 1), dcp::Standard::SMPTE);
        picture_asset->set_key (key);
        picture_asset->set_context_id (context_id);
-       auto picture_writer = picture_asset->start_write(dir / "picture.mxf", false);
+       auto picture_writer = picture_asset->start_write(dir / "picture.mxf", dcp::PictureAsset::Behaviour::MAKE_NEW);
        dcp::ArrayData picture("test/data/flat_red.j2c");
        for (int i = 0; i < 24; ++i) {
                picture_writer->write(picture);
@@ -165,7 +165,7 @@ BOOST_AUTO_TEST_CASE (decryption_test2)
        auto sound_asset = std::make_shared<dcp::SoundAsset>(dcp::Fraction(24, 1), 48000, 2, dcp::LanguageTag("en-GB"), dcp::Standard::SMPTE);
        sound_asset->set_key (key);
        sound_asset->set_context_id (context_id);
-       auto sound_writer = sound_asset->start_write(dir / "sound.mxf");
+       auto sound_writer = sound_asset->start_write(dir / "sound.mxf", {}, dcp::SoundAsset::AtmosSync::DISABLED, dcp::SoundAsset::MCASubDescriptors::ENABLED);
        std::array<float, 48000> left;
        std::array<float, 48000> right;
        for (int i = 0; i < 48000; ++i) {
@@ -175,7 +175,7 @@ BOOST_AUTO_TEST_CASE (decryption_test2)
        std::array<float*, 2> audio;
        audio[0] = left.data();
        audio[1] = right.data();
-       sound_writer->write (audio.data(), 48000);
+       sound_writer->write(audio.data(), 2, 48000);
        sound_writer->finalize ();
 
        auto subs_asset = std::make_shared<dcp::SMPTESubtitleAsset>();