summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-01-19 00:33:14 +0100
committerCarl Hetherington <cth@carlh.net>2021-01-19 00:33:14 +0100
commitcf46cfbcc9eaa6977ebafc800518f2c4288b6994 (patch)
tree7d6b8f45e9c4ce48e6ce05ac908e216256927f2c /src
parent1f284533185a798c0ed36669bd6c9729adf6ec5a (diff)
Bv2.1 10.1: if any asset is encrypted they all must be.
Diffstat (limited to 'src')
-rw-r--r--src/verify.cc6
-rw-r--r--src/verify.h4
2 files changed, 9 insertions, 1 deletions
diff --git a/src/verify.cc b/src/verify.cc
index 3b0fb7c9..5644d369 100644
--- a/src/verify.cc
+++ b/src/verify.cc
@@ -1131,6 +1131,10 @@ dcp::verify (
stage ("Checking CPL", cpl->file());
validate_xml (cpl->file().get(), xsd_dtd_directory, notes);
+ if (cpl->any_encrypted() && !cpl->all_encrypted()) {
+ notes.push_back ({VerificationNote::VERIFY_BV21_ERROR, VerificationNote::PARTIALLY_ENCRYPTED});
+ }
+
for (auto const& i: cpl->additional_subtitle_languages()) {
verify_language_tag (i, notes);
}
@@ -1514,6 +1518,8 @@ dcp::note_to_string (dcp::VerificationNote note)
return String::compose("The PKL %1, which has encrypted content, is not signed", note.file()->filename());
case dcp::VerificationNote::PKL_ANNOTATION_TEXT_DOES_NOT_MATCH_CPL_CONTENT_TITLE_TEXT:
return String::compose("The PKL %1 has only one CPL but its <AnnotationText> does not match the CPL's <ContentTitleText>", note.file()->filename());
+ case dcp::VerificationNote::PARTIALLY_ENCRYPTED:
+ return "Some assets are encrypted but some are not";
}
return "";
diff --git a/src/verify.h b/src/verify.h
index a48b65f3..32a369d0 100644
--- a/src/verify.h
+++ b/src/verify.h
@@ -178,7 +178,9 @@ public:
/** PKLs containing encrypted content must be signed Bv2.1_8.7 */
PKL_WITH_ENCRYPTED_CONTENT_NOT_SIGNED,
/** If a PKL has one CPL its <ContentTitleText> must be the same as the PKL's <AnnotationText> */
- PKL_ANNOTATION_TEXT_DOES_NOT_MATCH_CPL_CONTENT_TITLE_TEXT
+ PKL_ANNOTATION_TEXT_DOES_NOT_MATCH_CPL_CONTENT_TITLE_TEXT,
+ /** If any content is encrypted, everything must be encrypted */
+ PARTIALLY_ENCRYPTED,
};
VerificationNote (Type type, Code code)