summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-12-29 17:00:15 +0100
committerCarl Hetherington <cth@carlh.net>2024-12-30 14:29:26 +0100
commitdcc552b9edfdead0736cdf54ada4a6a479e09016 (patch)
treedf3b0c570ddb6882b65510ee112d1348a3b01b9e
parent48411d901329200fa65a5d37388d34f40e6ee4bc (diff)
Sign DCPs made during verification tests.
-rw-r--r--test/verify_test.cc14
1 files changed, 6 insertions, 8 deletions
diff --git a/test/verify_test.cc b/test/verify_test.cc
index 51448297..72e84f29 100644
--- a/test/verify_test.cc
+++ b/test/verify_test.cc
@@ -214,7 +214,11 @@ write_dcp_with_single_asset (path dir, shared_ptr<dcp::ReelAsset> reel_asset, dc
auto dcp = make_shared<dcp::DCP>(dir);
dcp->add (cpl);
dcp->set_annotation_text("hello");
- dcp->write_xml ();
+
+ auto signer = make_shared<dcp::CertificateChain>(dcp::file_to_string("test/data/certificate_chain"));
+ signer->set_key(dcp::file_to_string("test/data/private.key"));
+
+ dcp->write_xml(signer);
return cpl;
}
@@ -5789,13 +5793,7 @@ BOOST_AUTO_TEST_CASE(verify_encrypted_smpte_dcp)
ok(dcp::VerificationNote::Code::ALL_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_METADATA, canonical(cpl_file)
- ).set_cpl_id(cpl->id()),
- dcp::VerificationNote(
- dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::UNSIGNED_CPL_WITH_ENCRYPTED_CONTENT, canonical(cpl_file)
- ).set_cpl_id(cpl->id()),
- dcp::VerificationNote(
- dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::UNSIGNED_PKL_WITH_ENCRYPTED_CONTENT, filename_to_id(pkl_file.filename()), canonical(pkl_file)
- )
+ ).set_cpl_id(cpl->id())
});
}