diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-04-01 22:55:12 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-12-15 17:13:38 +0100 |
| commit | 0f525e4d9c1315236bb76cd2e8e38633c1dacd8e (patch) | |
| tree | c73a6c3bf30593346000bd32d2c5f9caf6e341f1 /src | |
| parent | da2837520e0d1f0d4d5aad04ee5bf11de303f6ed (diff) | |
Use error for INVALID_EXTENSION_METADATA.
Diffstat (limited to 'src')
| -rw-r--r-- | src/verify.cc | 6 | ||||
| -rw-r--r-- | src/verify.h | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/verify.cc b/src/verify.cc index 81cfd7fb..6291788b 100644 --- a/src/verify.cc +++ b/src/verify.cc @@ -1395,10 +1395,12 @@ dcp::verify_extension_metadata(Context& context) } } + using VN = dcp::VerificationNote; + if (missing) { context.bv21_error(VerificationNote::Code::MISSING_EXTENSION_METADATA, context.cpl->file().get()); } else if (!malformed.empty()) { - context.bv21_error(VerificationNote::Code::INVALID_EXTENSION_METADATA, malformed, context.cpl->file().get()); + context.add_note(VN(VN::Type::BV21_ERROR, VN::Code::INVALID_EXTENSION_METADATA, context.cpl->file().get()).set_error(malformed)); } } @@ -2135,7 +2137,7 @@ dcp::note_to_string(VerificationNote note, function<string (string)> process_str case VerificationNote::Code::MISSING_EXTENSION_METADATA: return compose("The CPL %1 has no <ExtensionMetadata> in its <CompositionMetadataAsset>.", note.cpl_id().get()); case VerificationNote::Code::INVALID_EXTENSION_METADATA: - return compose("The CPL %1 has a malformed <ExtensionMetadata> (%2).", filename(), note.note().get()); + return compose("The CPL %1 has a malformed <ExtensionMetadata> (%2).", filename(), note.error().get()); case VerificationNote::Code::UNSIGNED_CPL_WITH_ENCRYPTED_CONTENT: return compose("The CPL %1, which has encrypted content, is not signed.", note.cpl_id().get()); case VerificationNote::Code::UNSIGNED_PKL_WITH_ENCRYPTED_CONTENT: diff --git a/src/verify.h b/src/verify.h index 2c61771b..174a1125 100644 --- a/src/verify.h +++ b/src/verify.h @@ -336,7 +336,7 @@ public: */ MISSING_EXTENSION_METADATA, /** _<ExtensionMetadata>_ does not have the correct form [Bv2.1_8.6.3] - * note contains details of what's wrong + * error contains details of what's wrong * file contains the CPL filename */ INVALID_EXTENSION_METADATA, |
