summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-12-26 00:29:45 +0100
committerCarl Hetherington <cth@carlh.net>2024-04-15 10:59:34 +0200
commit482a757103731501b22836b8c669d572ae3ab769 (patch)
tree4e90bd17d7bd76ebb77c4bcb7d99e6f543fe57ed /src
parent45e3e3879e550b026b53a2bf0b5ae94a6b039db5 (diff)
Add OK note when all or nothing is encrypted.
Diffstat (limited to 'src')
-rw-r--r--src/verify.cc8
-rw-r--r--src/verify.h4
2 files changed, 12 insertions, 0 deletions
diff --git a/src/verify.cc b/src/verify.cc
index 3e335b71..167a7d8b 100644
--- a/src/verify.cc
+++ b/src/verify.cc
@@ -1540,6 +1540,10 @@ verify_cpl(Context& context, shared_ptr<const CPL> cpl)
if (cpl->any_encrypted() && !cpl->all_encrypted()) {
context.bv21_error(VerificationNote::Code::PARTIALLY_ENCRYPTED);
+ } else if (cpl->all_encrypted()) {
+ context.ok(VerificationNote::Code::ALL_ENCRYPTED);
+ } else if (!cpl->all_encrypted()) {
+ context.ok(VerificationNote::Code::NONE_ENCRYPTED);
}
for (auto const& i: cpl->additional_subtitle_languages()) {
@@ -2047,6 +2051,10 @@ dcp::note_to_string (VerificationNote note)
return String::compose("The PKL %1, which has encrypted content, is not signed.", note.note().get());
case VerificationNote::Code::MISMATCHED_PKL_ANNOTATION_TEXT_WITH_CPL:
return String::compose("The PKL %1 has only one CPL but its <AnnotationText> does not match the CPL's <ContentTitleText>.", note.note().get());
+ case VerificationNote::Code::ALL_ENCRYPTED:
+ return "All the assets are encrypted.";
+ case VerificationNote::Code::NONE_ENCRYPTED:
+ return "All the assets are unencrypted.";
case VerificationNote::Code::PARTIALLY_ENCRYPTED:
return "Some assets are encrypted but some are not.";
case VerificationNote::Code::INVALID_JPEG2000_CODESTREAM:
diff --git a/src/verify.h b/src/verify.h
index 4669f777..7219c419 100644
--- a/src/verify.h
+++ b/src/verify.h
@@ -338,6 +338,10 @@ public:
* file contains the PKL filename
*/
MISMATCHED_PKL_ANNOTATION_TEXT_WITH_CPL,
+ /** All content is encrypted */
+ ALL_ENCRYPTED,
+ /** No content is encrypted */
+ NONE_ENCRYPTED,
/** Some, but not all content, is encrypted */
PARTIALLY_ENCRYPTED,
/** General error during JPEG2000 codestream verification