*/
+#include "dcpomatic_spin_ctrl.h"
#include "make_chain_dialog.h"
#include "static_text.h"
#include "lib/cross.h"
add (s);
}
+ add (_("Valid for"), true);
+
+ {
+ auto s = new wxBoxSizer (wxHORIZONTAL);
+ s->Add (_validity = new SpinCtrl(this, 156), 0, wxALIGN_CENTER_VERTICAL);
+ s->Add (new StaticText(this, _("days")), 0, wxLEFT | wxALIGN_CENTER_VERTICAL, DCPOMATIC_SIZER_X_GAP);
+ add (s);
+ }
+
layout ();
_organisation->SetFocus ();
+
+ _validity->SetRange (7, 50 * 365);
+ _validity->SetValue (3650);
}
{
return make_shared<dcp::CertificateChain>(
openssl_path(),
- CERTIFICATE_VALIDITY_PERIOD,
+ _validity->GetValue(),
wx_to_std(_organisation->GetValue()),
wx_to_std(_organisational_unit->GetValue()),
"." + wx_to_std(_root_common_name->GetValue()),
/*
- Copyright (C) 2014-2015 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2014-2021 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
*/
+
#ifndef DCPOMATIC_MAKE_CHAIN_DIALOG_H
#define DCPOMATIC_MAKE_CHAIN_DIALOG_H
+
#include "table_dialog.h"
#include "wx_util.h"
+
+class SpinCtrl;
+
class MakeChainDialog : public TableDialog
{
public:
wxTextCtrl* _root_common_name;
wxTextCtrl* _intermediate_common_name;
wxTextCtrl* _leaf_common_name;
+ SpinCtrl* _validity;
};
+
#endif