More tests.
authorCarl Hetherington <cth@carlh.net>
Fri, 6 Dec 2019 21:45:55 +0000 (22:45 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 22 Dec 2019 00:21:00 +0000 (01:21 +0100)
src/verify.cc

index 6611b7b3104899d75ba8fb9d54883bfdac9e9e78..bdbf4071a16a23d4a1944739f62a8c6d4a64833a 100644 (file)
@@ -170,9 +170,16 @@ dcp::verify (vector<boost::filesystem::path> directories, function<void (string,
                        if (!good_date(cpl_doc.string_child("IssueDate"))) {
                                notes.push_back (VerificationNote(VerificationNote::VERIFY_ERROR, VerificationNote::Code::BAD_DATE, string("CPL <IssueDate> is malformed")));
                        }
+                       /* ContentVersion/Id */
                        if (cpl->standard() && cpl->standard().get() == SMPTE && !good_urn_uuid(cpl_doc.node_child("ContentVersion")->string_child("Id"))) {
                                notes.push_back (VerificationNote(VerificationNote::VERIFY_ERROR, VerificationNote::Code::BAD_URN_UUID, string("<ContentVersion> <Id> is malformed.")));
                        }
+                       /* Reel/Id */
+                       BOOST_FOREACH (cxml::ConstNodePtr i, cpl_doc.node_child("ReelList")->node_children("Reel")) {
+                               if (!good_urn_uuid(i->string_child("Id"))) {
+                                       notes.push_back (VerificationNote(VerificationNote::VERIFY_ERROR, VerificationNote::Code::BAD_URN_UUID, string("Reel <Id> is malformed")));
+                               }
+                       }
 
                        /* Check that the CPL's hash corresponds to the PKL */
                        BOOST_FOREACH (shared_ptr<PKL> i, dcp->pkls()) {