diff options
| author | Carl Hetherington <cth@carlh.net> | 2026-08-15 22:12:28 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2026-08-15 22:12:28 +0200 |
| commit | e06c123d9b33f89369c25ecb9c4838043d1928ac (patch) | |
| tree | 247e7872bf37e50728c644b173c5b827bf98bfb3 /test | |
| parent | dcd5784fe63471140b929b9563372056ba99e41f (diff) | |
There was a bug report that this didn't work but I think it does and the
reporter just missed the -F parameter.
Diffstat (limited to 'test')
| m--------- | test/data | 0 | ||||
| -rw-r--r-- | test/kdm_cli_test.cc | 30 |
2 files changed, 30 insertions, 0 deletions
diff --git a/test/data b/test/data -Subproject f7b5b476358b9d6f63c581a8a6c3018a8d09d1f +Subproject e6d06a30fc0cfbf0dabe72b1aec9940006cef33 diff --git a/test/kdm_cli_test.cc b/test/kdm_cli_test.cc index 4913986f3..64672a6c3 100644 --- a/test/kdm_cli_test.cc +++ b/test/kdm_cli_test.cc @@ -422,3 +422,33 @@ BOOST_AUTO_TEST_CASE(kdm_cli_trusted_device_chain) BOOST_CHECK_EQUAL(kdm.trusted_devices()[0], "KTEVkrCuEsqjXQSPy/H/lpVC9ys="); } + +BOOST_AUTO_TEST_CASE(kdm_cli_trusted_device_certificate) +{ + vector<string> args = { + "kdm_cli", + "--valid-from", "now", + "--valid-duration", "2 weeks", + "--projector-certificate", "test/data/cert.pem", + "--trusted-device-certificate", "test/data/cert2.pem", + "-o", "build/test", + "-F", "multiple-modified-transitional-1", + "test/data/dkdm.xml" + }; + + boost::filesystem::path const kdm_filename = "build/test/KDM_Test_FTR-1_F-133_XX-XX_MOS_2K_20220109_SMPTE_OV__.xml"; + boost::system::error_code ec; + boost::filesystem::remove(kdm_filename, ec); + + vector<string> output; + auto error = run(args, output); + BOOST_CHECK(!error); + BOOST_CHECK(output.empty()); + + BOOST_CHECK(boost::filesystem::exists(kdm_filename)); + + dcp::EncryptedKDM kdm(dcp::file_to_string(kdm_filename)); + BOOST_REQUIRE_EQUAL(kdm.trusted_devices().size(), 1U); + BOOST_CHECK_EQUAL(kdm.trusted_devices()[0], "6eTfSLShwQbexZZRRoxEsrsmq9M="); +} + |
