From 8e4f704c6624c42093306918a8904e2159bde141 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 18 Jan 2021 20:13:41 +0100 Subject: Bv2.1 8.7: CPLs with encrypted content must be signed. --- src/verify.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/verify.cc') diff --git a/src/verify.cc b/src/verify.cc index 58e777fb..3f15668f 100644 --- a/src/verify.cc +++ b/src/verify.cc @@ -1300,6 +1300,15 @@ dcp::verify ( } check_extension_metadata (cpl, notes); + + if (cpl->encrypted()) { + cxml::Document doc ("CompositionPlaylist"); + DCP_ASSERT (cpl->file()); + doc.read_file (cpl->file().get()); + if (!doc.optional_node_child("Signature")) { + notes.push_back ({VerificationNote::VERIFY_BV21_ERROR, VerificationNote::CPL_WITH_ENCRYPTED_CONTENT_NOT_SIGNED, cpl->file().get()}); + } + } } } @@ -1441,6 +1450,8 @@ dcp::note_to_string (dcp::VerificationNote note) return "The CPL metadata must contain "; case dcp::VerificationNote::INVALID_EXTENSION_METADATA: return String::compose("The is malformed in some way: %1", note.note().get()); + case dcp::VerificationNote::CPL_WITH_ENCRYPTED_CONTENT_NOT_SIGNED: + return String::compose("The CPL %1, which has encrypted content, is not signed", note.file()->filename()); } return ""; -- cgit v1.2.3