summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cscript4
-rw-r--r--src/encrypted_kdm.cc11
-rw-r--r--src/encrypted_kdm.h1
-rw-r--r--src/smpte_text_asset.h1
-rw-r--r--src/verify.cc6
-rw-r--r--test/verify_test.cc28
6 files changed, 45 insertions, 6 deletions
diff --git a/cscript b/cscript
index 5d46dde7..85d62bd4 100644
--- a/cscript
+++ b/cscript
@@ -47,7 +47,7 @@ def build_with_cpp17(target):
def dependencies(target, options, for_package):
deps = [
- ('libcxml', 'v0.17.16', { 'c++17': build_with_cpp17(target) }),
+ ('libcxml', 'v0.17.17', { 'c++17': build_with_cpp17(target) }),
('asdcplib', 'v1.0.9')
]
@@ -79,7 +79,7 @@ def build(target, options, for_package, version):
cmd += ' --static'
if target.distro == 'debian' or (target.distro == 'centos' and target.version != 'stream10') or (target.distro == 'rocky' and target.version != '10') or target.distro == 'mageia':
cmd += ' --disable-tests'
- if target.distro == 'ubuntu' and target.version == '16.04':
+ if (target.distro, target.version) in [('rocky', '8'), ('ubuntu', '18.04'), ('ubuntu', '16.04')]:
cmd += ' --static-boost'
elif target.platform == 'windows':
cmd += f' --target-windows-{target.bits}'
diff --git a/src/encrypted_kdm.cc b/src/encrypted_kdm.cc
index d1089c0b..23cbb0b5 100644
--- a/src/encrypted_kdm.cc
+++ b/src/encrypted_kdm.cc
@@ -646,6 +646,10 @@ EncryptedKDM::EncryptedKDM (
kre.recipient.x509_subject_name = recipient.subject ();
kre.composition_playlist_id = cpl_id;
if (formulation == Formulation::DCI_ANY || formulation == Formulation::DCI_SPECIFIC) {
+ /* XXX: this should be the thumbprint of one of the CPL signer certificates,
+ * which might not necessarily be the case if we're using a CPL from somebody
+ * else.
+ */
kre.content_authenticator = signer->leaf().thumbprint ();
}
kre.content_title_text = content_title_text;
@@ -835,3 +839,10 @@ dcp::operator== (EncryptedKDM const & a, EncryptedKDM const & b)
/* Not exactly efficient... */
return a.as_xml() == b.as_xml();
}
+
+
+vector<string>
+EncryptedKDM::trusted_devices() const
+{
+ return _data->authenticated_public.required_extensions.kdm_required_extensions.authorized_device_info->certificate_thumbprints;
+}
diff --git a/src/encrypted_kdm.h b/src/encrypted_kdm.h
index e74dde69..1f54cc05 100644
--- a/src/encrypted_kdm.h
+++ b/src/encrypted_kdm.h
@@ -103,6 +103,7 @@ public:
LocalTime not_valid_after () const;
std::string recipient_x509_subject_name () const;
CertificateChain signer_certificate_chain () const;
+ std::vector<std::string> trusted_devices() const;
private:
diff --git a/src/smpte_text_asset.h b/src/smpte_text_asset.h
index 9b7f09a6..13771833 100644
--- a/src/smpte_text_asset.h
+++ b/src/smpte_text_asset.h
@@ -216,7 +216,6 @@ private:
friend struct ::write_subtitles_in_vertical_order_with_top_alignment;
friend struct ::write_subtitles_in_vertical_order_with_bottom_alignment;
- void read_fonts (std::shared_ptr<ASDCP::TimedText::MXFReader>);
void parse_xml (std::shared_ptr<cxml::Document> xml);
void read_mxf_descriptor (std::shared_ptr<ASDCP::TimedText::MXFReader> reader);
void read_mxf_resources (std::shared_ptr<ASDCP::TimedText::MXFReader> reader, std::shared_ptr<DecryptionContext> dec);
diff --git a/src/verify.cc b/src/verify.cc
index ac12800b..887ac166 100644
--- a/src/verify.cc
+++ b/src/verify.cc
@@ -1211,7 +1211,7 @@ dcp::verify_text_lines_and_characters(
/* Make a list of "subtitle starts" and "subtitle ends" events */
for (auto j: asset->texts()) {
if (auto text = dynamic_pointer_cast<const TextString>(j)) {
- auto in = make_shared<Event>(text->in(), position(text), text->text().length());
+ auto in = make_shared<Event>(text->in(), position(text), utf8_strlen(text->text()));
events.push_back(in);
events.push_back(make_shared<Event>(text->out(), in));
}
@@ -2243,7 +2243,6 @@ dcp::VerificationNote::type() const
case Code::INCORRECT_TIMED_TEXT_ASSET_ID:
case Code::INVALID_CLOSED_CAPTION_LINE_COUNT:
case Code::INVALID_CLOSED_CAPTION_LINE_LENGTH:
- case Code::INVALID_CLOSED_CAPTION_XML_SIZE_IN_BYTES:
case Code::INVALID_EXTENSION_METADATA:
case Code::INVALID_PICTURE_SIZE_IN_PIXELS:
case Code::INVALID_LANGUAGE:
@@ -2288,7 +2287,6 @@ dcp::VerificationNote::type() const
case Code::INCORRECT_JPEG2000_POC_MARKER_COUNT_FOR_2K:
case Code::INCORRECT_JPEG2000_POC_MARKER_COUNT_FOR_4K:
case Code::MISSING_JPEG2000_TLM_MARKER:
- case Code::INVALID_SUBTITLE_DURATION_BV21:
return Type::BV21_ERROR;
case Code::DUPLICATE_ASSET_ID_IN_ASSETMAP:
case Code::DUPLICATE_ASSET_ID_IN_PKL:
@@ -2349,6 +2347,8 @@ dcp::VerificationNote::type() const
case Code::NEARLY_INVALID_PICTURE_FRAME_SIZE_IN_BYTES:
case Code::NEARLY_INVALID_SUBTITLE_LINE_LENGTH:
case Code::THREED_ASSET_MARKED_AS_TWOD:
+ case Code::INVALID_SUBTITLE_DURATION_BV21:
+ case Code::INVALID_CLOSED_CAPTION_XML_SIZE_IN_BYTES:
return Type::WARNING;
};
diff --git a/test/verify_test.cc b/test/verify_test.cc
index 40a4aa1a..88e6681b 100644
--- a/test/verify_test.cc
+++ b/test/verify_test.cc
@@ -3167,6 +3167,34 @@ BOOST_AUTO_TEST_CASE (verify_invalid_closed_caption_line_length)
}
+BOOST_AUTO_TEST_CASE(verify_invalid_closed_caption_line_length_with_utf8)
+{
+ auto const dir = path("build/test/verify_invalid_closed_caption_line_length_with_utf8");
+ auto cpl = dcp_with_text<dcp::ReelSMPTETextAsset> (
+ dcp::TextType::CLOSED_CAPTION,
+ dir,
+ {
+ { 96, 300, 0.0, dcp::VAlign::CENTER, "0123456789012345678901234567890…" }
+ });
+
+ using VN = dcp::VerificationNote;
+ using VC = VN::Code;
+
+ check_verify_result (
+ {dir},
+ {},
+ {
+ note(VC::NONE_ENCRYPTED, cpl),
+ note(VC::MATCHING_CPL_HASHES, cpl),
+ VN(VC::VALID_CPL_ANNOTATION_TEXT).set_cpl_id(cpl->id()).set_annotation_text("hello"),
+ note(VC::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpl),
+ note(VC::VALID_CONTENT_KIND, cpl).set_content_kind("trailer"),
+ note(VC::VALID_CONTENT_VERSION_LABEL_TEXT, cpl).set_content_version(cpl->content_version()->label_text),
+ VN(VC::MISSING_CPL_METADATA, cpl->file().get()).set_cpl_id(cpl->id())
+ });
+}
+
+
BOOST_AUTO_TEST_CASE (verify_mismatched_closed_caption_valign1)
{
auto const dir = path ("build/test/verify_mismatched_closed_caption_valign1");