X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Fwx%2Fconfig_dialog.cc;h=fd6bcb08663433e13760313f6118c33567d7d863;hp=53adcd0a067a3296df8206eba5604c1d2d81c532;hb=0242efb9802d7bcbde0701a7267972d4dbe5abb8;hpb=9e69c78fe4473279d848341d64ade8c834ebebd7 diff --git a/src/wx/config_dialog.cc b/src/wx/config_dialog.cc index 53adcd0a0..fd6bcb086 100644 --- a/src/wx/config_dialog.cc +++ b/src/wx/config_dialog.cc @@ -39,7 +39,7 @@ #include "lib/cross.h" #include "lib/exceptions.h" #include -#include +#include #include #include #include @@ -676,7 +676,7 @@ private: void config_changed () { - _signer.reset (new dcp::Signer (*Config::instance()->signer().get ())); + _signer.reset (new dcp::CertificateChain (*Config::instance()->signer().get ())); update_certificate_list (); update_signer_private_key (); @@ -692,7 +692,7 @@ private: if (d->ShowModal() == wxID_OK) { try { dcp::Certificate c (dcp::file_to_string (wx_to_std (d->GetPath ()))); - _signer->certificates().add (c); + _signer->add (c); Config::instance()->set_signer (_signer); update_certificate_list (); } catch (dcp::MiscError& e) { @@ -713,7 +713,7 @@ private: } _certificates->DeleteItem (i); - _signer->certificates().remove (i); + _signer->remove (i); Config::instance()->set_signer (_signer); update_sensitivity (); @@ -722,7 +722,7 @@ private: void update_certificate_list () { _certificates->DeleteAllItems (); - dcp::CertificateChain::List certs = _signer->certificates().root_to_leaf (); + dcp::CertificateChain::List certs = _signer->root_to_leaf (); size_t n = 0; for (dcp::CertificateChain::List::const_iterator i = certs.begin(); i != certs.end(); ++i) { wxListItem item; @@ -744,11 +744,11 @@ private: void remake_certificates () { - dcp::CertificateChain chain = Config::instance()->signer()->certificates (); + shared_ptr chain = Config::instance()->signer(); string intermediate_common_name; - if (chain.root_to_leaf().size() >= 3) { - dcp::CertificateChain::List all = chain.root_to_leaf (); + if (chain->root_to_leaf().size() >= 3) { + dcp::CertificateChain::List all = chain->root_to_leaf (); dcp::CertificateChain::List::iterator i = all.begin (); ++i; intermediate_common_name = i->subject_common_name (); @@ -756,16 +756,16 @@ private: MakeSignerChainDialog* d = new MakeSignerChainDialog ( _panel, - chain.root().subject_organization_name (), - chain.root().subject_organizational_unit_name (), - chain.root().subject_common_name (), + chain->root().subject_organization_name (), + chain->root().subject_organizational_unit_name (), + chain->root().subject_common_name (), intermediate_common_name, - chain.leaf().subject_common_name () + chain->leaf().subject_common_name () ); if (d->ShowModal () == wxID_OK) { _signer.reset ( - new dcp::Signer ( + new dcp::CertificateChain ( openssl_path (), d->organisation (), d->organisational_unit (), @@ -790,7 +790,7 @@ private: void update_signer_private_key () { - checked_set (_signer_private_key, dcp::private_key_fingerprint (_signer->key ())); + checked_set (_signer_private_key, dcp::private_key_fingerprint (_signer->key().get ())); } void load_signer_private_key () @@ -894,7 +894,7 @@ private: wxStaticText* _decryption_private_key; wxButton* _load_decryption_private_key; wxButton* _export_decryption_certificate; - shared_ptr _signer; + shared_ptr _signer; }; class TMSPage : public StandardPage