if (d->ShowModal() == wxID_OK) {
try {
- dcp::Certificate c (dcp::file_to_string (wx_to_std (d->GetPath ())));
- if (c.extra_data ()) {
+ dcp::Certificate c;
+ string const extra = c.read_string (dcp::file_to_string (wx_to_std (d->GetPath ())));
+ if (!extra.empty ()) {
message_dialog (
this,
_("This file contains other certificates (or other data) after its first certificate. "
if (d->ShowModal () == wxID_OK) {
FILE* f = fopen_boost (wx_to_std (d->GetPath ()), "w");
if (!f) {
- throw OpenFileError (wx_to_std (d->GetPath ()));
+ throw OpenFileError (wx_to_std (d->GetPath ()), errno, false);
}
string const s = j->certificate (true);
if (d->ShowModal () == wxID_OK) {
FILE* f = fopen_boost (wx_to_std (d->GetPath ()), "w");
if (!f) {
- throw OpenFileError (wx_to_std (d->GetPath ()));
+ throw OpenFileError (wx_to_std (d->GetPath ()), errno, false);
}
string const s = _chain->key().get ();
if (d->ShowModal () == wxID_OK) {
FILE* f = fopen_boost (wx_to_std (d->GetPath ()), "w");
if (!f) {
- throw OpenFileError (wx_to_std (d->GetPath ()));
+ throw OpenFileError (wx_to_std (d->GetPath ()), errno, false);
}
string const s = Config::instance()->decryption_chain()->leaf().certificate (true);
if (d->ShowModal () == wxID_OK) {
FILE* f = fopen_boost (wx_to_std (d->GetPath ()), "w");
if (!f) {
- throw OpenFileError (wx_to_std (d->GetPath ()));
+ throw OpenFileError (wx_to_std (d->GetPath ()), errno, false);
}
string const s = Config::instance()->decryption_chain()->chain();