Improve error when the KDM period is outside the signer period in the KDM creator.
authorCarl Hetherington <cth@carlh.net>
Fri, 27 Jan 2023 22:09:53 +0000 (23:09 +0100)
committerCarl Hetherington <cth@carlh.net>
Sat, 11 Feb 2023 21:26:38 +0000 (22:26 +0100)
src/tools/dcpomatic_kdm.cc

index 9d6fa2e8f21df8ffd44a05944d657f2bf2d643e9..f0406c1d0eecaaa346ba04184f60d27f23fa038e 100644 (file)
@@ -453,6 +453,13 @@ private:
                                        wxString::Format (s, result.second, std_to_wx(_output->directory().string()).data())
                                        );
                        }
+               } catch (dcp::BadKDMDateError& e) {
+                       if (e.starts_too_early()) {
+                               error_dialog(this, _("The KDM start period is before (or close to) the start of the signing certificate's validity period.  Use a later start time for this KDM."));
+                       } else {
+                               error_dialog(this, _("The KDM end period is after (or close to) the end of the signing certficates' validity period.  Either use an earlier end time for this KDM or re-create your signing certificates in the DCP-o-matic preferences window."));
+                       }
+                       return;
                } catch (dcp::NotEncryptedError& e) {
                        error_dialog (this, _("CPL's content is not encrypted."));
                } catch (exception& e) {