Make DKDMs with validity 2 minutes shorter than the signer certificate
[dcpomatic.git] / src / tools / dcpomatic.cc
index 68bf20732a0685d79b3e44800a4003c921522093..ea3cfbe32c7697665208917074d1365285e5c57a 100644 (file)
@@ -92,6 +92,9 @@
 #include <wx/preferences.h>
 #include <wx/splash.h>
 #include <wx/wxhtml.h>
+#ifdef __WXGTK__
+#include <X11/Xlib.h>
+#endif
 #ifdef __WXMSW__
 #include <shellapi.h>
 #endif
@@ -876,10 +879,10 @@ 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);
+               dcp::LocalTime from (Config::instance()->signer_chain()->leaf().not_before());
+               from.add_minutes (1);
+               dcp::LocalTime to (Config::instance()->signer_chain()->leaf().not_after());
+               to.add_minutes (-1);
 
                optional<dcp::EncryptedKDM> kdm;
                try {
@@ -1503,7 +1506,11 @@ public:
                : wxApp ()
                , _frame (0)
                , _splash (0)
-       {}
+       {
+#ifdef DCPOMATIC_LINUX
+               XInitThreads ();
+#endif
+       }
 
 private: