diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-01-19 22:03:21 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-02-11 22:26:38 +0100 |
| commit | 788ef2cf5daf510651cc4f5eb7940d7bd0c44b76 (patch) | |
| tree | 75505127edb1356dfccfeda76232d49d66a9609a /src/lib/screen.cc | |
| parent | 57cbdbed89e6432049fec50ecef28b5b57bcf301 (diff) | |
Warn/error on making KDMs using recipient certs whose validity periods
lie outside those of the KDMs (#2423).
Diffstat (limited to 'src/lib/screen.cc')
| -rw-r--r-- | src/lib/screen.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/lib/screen.cc b/src/lib/screen.cc index 2c821eceb..453a833d7 100644 --- a/src/lib/screen.cc +++ b/src/lib/screen.cc @@ -19,10 +19,11 @@ */ -#include "screen.h" -#include "kdm_with_metadata.h" -#include "film.h" #include "cinema.h" +#include "film.h" +#include "kdm_util.h" +#include "kdm_with_metadata.h" +#include "screen.h" #include <libxml++/libxml++.h> #include <boost/algorithm/string.hpp> #include <boost/date_time/posix_time/posix_time.hpp> @@ -80,7 +81,8 @@ kdm_for_screen ( boost::posix_time::ptime valid_to, dcp::Formulation formulation, bool disable_forensic_marking_picture, - optional<int> disable_forensic_marking_audio + optional<int> disable_forensic_marking_audio, + vector<KDMCertificatePeriod>& period_checks ) { if (!screen->recipient) { @@ -91,6 +93,8 @@ kdm_for_screen ( dcp::LocalTime const begin(valid_from, dcp::UTCOffset(cinema ? cinema->utc_offset_hour() : 0, cinema ? cinema->utc_offset_minute() : 0)); dcp::LocalTime const end (valid_to, dcp::UTCOffset(cinema ? cinema->utc_offset_hour() : 0, cinema ? cinema->utc_offset_minute() : 0)); + period_checks.push_back(check_kdm_and_certificate_validity_periods(screen->recipient.get(), begin, end)); + auto const kdm = film->make_kdm ( screen->recipient.get(), screen->trusted_device_thumbprints(), |
