+2014-09-11 Carl Hetherington <cth@carlh.net>
+
+ * Add option to re-make signing chain with specified organisation,
+ common names etc. (#354)
+
2014-09-10 Carl Hetherington <cth@carlh.net>
* Version 2.0.8 released.
#include "isdcf_metadata_dialog.h"
#include "preset_colour_conversion_dialog.h"
#include "server_dialog.h"
+#include "make_signer_chain_dialog.h"
using std::vector;
using std::string;
table->AddGrowableCol (1, 1);
overall_sizer->Add (table, 1, wxALL | wxEXPAND, _border);
+ _remake_certificates = new wxButton (_panel, wxID_ANY, _("Re-make certificates..."));
+ table->Add (_remake_certificates, 0);
+ table->AddSpacer (0);
+
add_label_to_sizer (table, _panel, _("Private key for leaf certificate"), true);
{
wxSizer* s = new wxBoxSizer (wxHORIZONTAL);
_remove_certificate->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&KeysPage::remove_certificate, this));
_certificates->Bind (wxEVT_COMMAND_LIST_ITEM_SELECTED, boost::bind (&KeysPage::update_sensitivity, this));
_certificates->Bind (wxEVT_COMMAND_LIST_ITEM_DESELECTED, boost::bind (&KeysPage::update_sensitivity, this));
+ _remake_certificates->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&KeysPage::remake_certificates, this));
_load_signer_private_key->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&KeysPage::load_signer_private_key, this));
_load_decryption_certificate->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&KeysPage::load_decryption_certificate, this));
_load_decryption_private_key->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&KeysPage::load_decryption_private_key, this));
}
}
+ void remake_certificates ()
+ {
+ MakeSignerChainDialog* d = new MakeSignerChainDialog (_panel);
+ if (d->ShowModal () == wxID_OK) {
+ _signer.reset (
+ new dcp::Signer (
+ openssl_path (),
+ d->organisation (),
+ d->organisational_unit (),
+ d->root_common_name (),
+ d->intermediate_common_name (),
+ d->leaf_common_name ()
+ )
+ );
+
+ Config::instance()->set_signer (_signer);
+ update_certificate_list ();
+ update_signer_private_key ();
+ }
+
+ d->Destroy ();
+ }
+
void update_sensitivity ()
{
_remove_certificate->Enable (_certificates->GetNextItem (-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED) != -1);
wxListCtrl* _certificates;
wxButton* _add_certificate;
wxButton* _remove_certificate;
+ wxButton* _remake_certificates;
wxStaticText* _signer_private_key;
wxButton* _load_signer_private_key;
wxStaticText* _decryption_certificate;
--- /dev/null
+/*
+ Copyright (C) 2014 Carl Hetherington <cth@carlh.net>
+
+ This program 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.
+
+ This program 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 this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "make_signer_chain_dialog.h"
+
+MakeSignerChainDialog::MakeSignerChainDialog (wxWindow* parent)
+ : TableDialog (parent, _("Make certificate chain"), 2, true)
+{
+ add (_("Organisation"), true);
+ add (_organisation = new wxTextCtrl (this, wxID_ANY));
+ add (_("Organisational unit"), true);
+ add (_organisational_unit = new wxTextCtrl (this, wxID_ANY));
+ add (_("Root common name"), true);
+ add (_root_common_name = new wxTextCtrl (this, wxID_ANY));
+ add (_("Intermediate common name"), true);
+ add (_intermediate_common_name = new wxTextCtrl (this, wxID_ANY));
+ add (_("Leaf common name"), true);
+ add (_leaf_common_name = new wxTextCtrl (this, wxID_ANY));
+}
--- /dev/null
+/*
+ Copyright (C) 2014 Carl Hetherington <cth@carlh.net>
+
+ This program 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.
+
+ This program 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 this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "table_dialog.h"
+#include "wx_util.h"
+
+class MakeSignerChainDialog : public TableDialog
+{
+public:
+ MakeSignerChainDialog (wxWindow* parent);
+
+ std::string organisation () const {
+ return wx_to_std (_organisation->GetValue ());
+ }
+
+ std::string organisational_unit () const {
+ return wx_to_std (_organisational_unit->GetValue ());
+ }
+
+ std::string root_common_name () const {
+ return wx_to_std (_root_common_name->GetValue ());
+ }
+
+ std::string intermediate_common_name () const {
+ return wx_to_std (_intermediate_common_name->GetValue ());
+ }
+
+ std::string leaf_common_name () const {
+ return wx_to_std (_leaf_common_name->GetValue ());
+ }
+
+
+private:
+ wxTextCtrl* _organisation;
+ wxTextCtrl* _organisational_unit;
+ wxTextCtrl* _root_common_name;
+ wxTextCtrl* _intermediate_common_name;
+ wxTextCtrl* _leaf_common_name;
+};
+
job_manager_view.cc
job_wrapper.cc
kdm_dialog.cc
+ make_signer_chain_dialog.cc
new_film_dialog.cc
preset_colour_conversion_dialog.cc
properties_dialog.cc