diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/verify.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/verify.cc b/src/verify.cc index 984cdf4a..bd61124c 100644 --- a/src/verify.cc +++ b/src/verify.cc @@ -115,6 +115,15 @@ dcp::verify (vector<boost::filesystem::path> directories, function<void (string, BOOST_FOREACH (shared_ptr<CPL> cpl, dcp->cpls()) { stage ("Checking CPL", cpl->file()); + + /* Check that the CPL's hash corresponds to the PKL */ + BOOST_FOREACH (shared_ptr<PKL> i, dcp->pkls()) { + optional<string> h = i->hash(cpl->id()); + if (h && make_digest(Data(*cpl->file())) != *h) { + notes.push_back (VerificationNote(VerificationNote::VERIFY_ERROR, "CPL hash is incorrect.")); + } + } + BOOST_FOREACH (shared_ptr<Reel> reel, cpl->reels()) { stage ("Checking reel", optional<boost::filesystem::path>()); if (reel->main_picture()) { |
