From 482a757103731501b22836b8c669d572ae3ab769 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 26 Dec 2022 00:29:45 +0100 Subject: Add OK note when all or nothing is encrypted. --- src/verify.cc | 8 ++++++++ src/verify.h | 4 ++++ 2 files changed, 12 insertions(+) (limited to 'src') 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 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 does not match the CPL's .", 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 -- cgit v1.2.3