Fix error when trying to make DCP-o-matic DKDMs due to attempts to make
authorCarl Hetherington <cth@carlh.net>
Mon, 23 Dec 2019 00:09:36 +0000 (01:09 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 23 Dec 2019 00:09:36 +0000 (01:09 +0100)
the validity time wider than that of the signing certificate.

src/tools/dcpomatic.cc

index 4ddedab41651e374a7f5b3f025ecbc759ca397c6..a8930f81fed9566f00f10b208ab4e16fb0c62ec2 100644 (file)
@@ -875,14 +875,19 @@ private:
                                )
                        );
 
+
+               dcp::LocalTime from (Config::instance()->decryption_chain()->leaf().not_before());
+               from.add_months (1);
+               dcp::LocalTime to (Config::instance()->decryption_chain()->leaf().not_after());
+               to.add_months (-1);
+
                optional<dcp::EncryptedKDM> kdm;
                try {
                        kdm = _film->make_kdm (
                                Config::instance()->decryption_chain()->leaf(),
                                vector<string>(),
                                d->cpl (),
-                               dcp::LocalTime ("2012-01-01T01:00:00+00:00"),
-                               dcp::LocalTime ("2112-01-01T01:00:00+00:00"),
+                               from, to,
                                dcp::MODIFIED_TRANSITIONAL_1,
                                true,
                                0