using std::string;
using boost::optional;
using boost::bind;
+#if BOOST_VERSION >= 106100
+using namespace boost::placeholders;
+#endif
ChristieCertificatePanel::ChristieCertificatePanel (DownloadCertificateDialog* dialog)
: CredentialsDownloadCertificatePanel (
string const url = String::compose ("%1F-IMB/F-IMB_%2_sha256.pem", prefix, serial);
optional<string> all_errors;
+ bool ok = true;
- optional<string> error = get_from_url (url, true, false, boost::bind (&DownloadCertificatePanel::load, this, _1));
+ auto error = get_from_url (url, true, false, boost::bind(&DownloadCertificatePanel::load_certificate_from_chain, this, _1, _2));
if (error) {
all_errors = *error;
- string const url = String::compose ("%1IMB-S2/IMB-S2_%2_sha256.pem", prefix, serial);
+ auto const url = String::compose ("%1IMB-S2/IMB-S2_%2_sha256.pem", prefix, serial);
- error = get_from_url (url, true, false, boost::bind (&DownloadCertificatePanel::load, this, _1));
+ error = get_from_url (url, true, false, boost::bind(&DownloadCertificatePanel::load_certificate_from_chain, this, _1, _2));
if (error) {
*all_errors += "\n" + *error;
+ ok = false;
}
}
- if (all_errors) {
+ if (ok) {
+ _dialog->message()->SetLabel (_("Certificate downloaded"));
+ _dialog->setup_sensitivity ();
+ } else {
_dialog->message()->SetLabel(wxT(""));
error_dialog (this, std_to_wx(*all_errors));
- } else {
- _dialog->message()->SetLabel (_("Certificate dowloaded"));
- _dialog->setup_sensitivity ();
}
}