-void
-KeysPage::export_decryption_chain ()
-{
- wxFileDialog* d = new wxFileDialog (
- _panel, _("Select Chain File"), wxEmptyString, _("dcpomatic_kdm_decryption_chain.pem"), wxT ("PEM files (*.pem)|*.pem"),
- wxFD_SAVE | wxFD_OVERWRITE_PROMPT
- );
-
- if (d->ShowModal () == wxID_OK) {
- boost::filesystem::path path (wx_to_std(d->GetPath()));
- FILE* f = fopen_boost (path, "w");
- if (!f) {
- throw OpenFileError (path, errno, false);
- }
-
- string const s = Config::instance()->decryption_chain()->chain();
- checked_fwrite (s.c_str(), s.length(), f, path);
- fclose (f);
- }
- d->Destroy ();
-}
-