summaryrefslogtreecommitdiff
path: root/src/wx
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-03-09 00:55:49 +0000
committerCarl Hetherington <cth@carlh.net>2018-03-09 00:55:49 +0000
commit6d770c4c8c79569871edc20253f29f9ea00539e6 (patch)
treeee21cd67d784084cef98c0dfb3b8c4319dc1935f /src/wx
parent67ff21a970b9c680e243eec9e7129a256898e156 (diff)
Check for signer chains containing UTF8-marked strings and offer
to fix them on startup (#1218).
Diffstat (limited to 'src/wx')
-rw-r--r--src/wx/recreate_chain_dialog.cc52
-rw-r--r--src/wx/recreate_chain_dialog.h32
-rw-r--r--src/wx/wscript1
3 files changed, 85 insertions, 0 deletions
diff --git a/src/wx/recreate_chain_dialog.cc b/src/wx/recreate_chain_dialog.cc
new file mode 100644
index 000000000..b59e99ddc
--- /dev/null
+++ b/src/wx/recreate_chain_dialog.cc
@@ -0,0 +1,52 @@
+/*
+ Copyright (C) 2018 Carl Hetherington <cth@carlh.net>
+
+ This file is part of DCP-o-matic.
+
+ DCP-o-matic is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ DCP-o-matic is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+#include "recreate_chain_dialog.h"
+#include "wx_util.h"
+#include "lib/config.h"
+#include "lib/cinema_kdms.h"
+#include <boost/foreach.hpp>
+
+using std::list;
+using std::string;
+
+RecreateChainDialog::RecreateChainDialog (wxWindow* parent)
+ : QuestionDialog (parent, _("Certificate chain"), _("Recreate signing certificates"), _("Do nothing"))
+{
+ wxString const message = _("The certificate chain that DCP-o-matic uses for signing DCPs and KDMs contains a small error\n"
+ "which will prevent DCPs from being validated correctly on some systems. Do you want to re-create\n"
+ "the certificate chain for signing DCPs and KDMs?");
+
+ _sizer->Add (new wxStaticText (this, wxID_ANY, message), 1, wxEXPAND | wxALL, DCPOMATIC_DIALOG_BORDER);
+
+ wxCheckBox* shut_up = new wxCheckBox (this, wxID_ANY, _("Don't ask this again"));
+ _sizer->Add (shut_up, 0, wxALL, DCPOMATIC_DIALOG_BORDER);
+
+ shut_up->Bind (wxEVT_CHECKBOX, bind (&RecreateChainDialog::shut_up, this, _1));
+
+ layout ();
+}
+
+void
+RecreateChainDialog::shut_up (wxCommandEvent& ev)
+{
+ std::cout << "set nagged " << ev.IsChecked() << "\n";
+ Config::instance()->set_nagged (Config::NAG_BAD_SIGNER_CHAIN, ev.IsChecked());
+}
diff --git a/src/wx/recreate_chain_dialog.h b/src/wx/recreate_chain_dialog.h
new file mode 100644
index 000000000..287e65767
--- /dev/null
+++ b/src/wx/recreate_chain_dialog.h
@@ -0,0 +1,32 @@
+/*
+ Copyright (C) 2018 Carl Hetherington <cth@carlh.net>
+
+ This file is part of DCP-o-matic.
+
+ DCP-o-matic is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ DCP-o-matic is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+#include "question_dialog.h"
+#include <wx/wx.h>
+#include <list>
+
+class RecreateChainDialog : public QuestionDialog
+{
+public:
+ RecreateChainDialog (wxWindow* parent);
+
+private:
+ void shut_up (wxCommandEvent& ev);
+};
diff --git a/src/wx/wscript b/src/wx/wscript
index 86065731c..227691be1 100644
--- a/src/wx/wscript
+++ b/src/wx/wscript
@@ -82,6 +82,7 @@ sources = """
playhead_to_timecode_dialog.cc
playhead_to_frame_dialog.cc
question_dialog.cc
+ recreate_chain_dialog.cc
repeat_dialog.cc
report_problem_dialog.cc
rename_template_dialog.cc