summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-01-18 20:13:41 +0100
committerCarl Hetherington <cth@carlh.net>2021-01-18 20:13:41 +0100
commit8e4f704c6624c42093306918a8904e2159bde141 (patch)
tree3dbacecdfbe9454d674ad469d89fb10d8eb0e521 /test
parentb2e68c20550fce629d9ebaf1fca5244d1e2ca517 (diff)
Bv2.1 8.7: CPLs with encrypted content must be signed.
Diffstat (limited to 'test')
-rw-r--r--test/verify_test.cc27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/verify_test.cc b/test/verify_test.cc
index 34f95aad..3d30797e 100644
--- a/test/verify_test.cc
+++ b/test/verify_test.cc
@@ -2358,3 +2358,30 @@ BOOST_AUTO_TEST_CASE (verify_cpl_extension_metadata9)
}
+
+BOOST_AUTO_TEST_CASE (verify_encrypted_cpl_is_signed)
+{
+ boost::filesystem::path dir = "build/test/verify_encrypted_cpl_is_signed";
+ prepare_directory (dir);
+ for (auto i: boost::filesystem::directory_iterator("test/ref/DCP/encryption_test")) {
+ boost::filesystem::copy_file (i.path(), dir / i.path().filename());
+ }
+
+ {
+ Editor e (dir / "cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml");
+ e.delete_lines ("<dsig:Signature", "</dsig:Signature>");
+ }
+
+ check_verify_result (
+ {dir},
+ {
+ { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::CPL_HASH_INCORRECT },
+ { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::MISSING_FFEC_IN_FEATURE },
+ { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::MISSING_FFMC_IN_FEATURE },
+ { dcp::VerificationNote::VERIFY_WARNING, dcp::VerificationNote::MISSING_FFOC },
+ { dcp::VerificationNote::VERIFY_WARNING, dcp::VerificationNote::MISSING_LFOC },
+ { dcp::VerificationNote::VERIFY_WARNING, dcp::VerificationNote::MISSING_CPL_METADATA },
+ { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::CPL_WITH_ENCRYPTED_CONTENT_NOT_SIGNED }
+ });
+}
+