X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fgdc_certificate_panel.cc;h=e670f01eb4815f543a07cf96ac061e88ef89f031;hb=865316f0129c85cdd0248b87502fe97dec94b3f0;hp=a4301087dea1980f1dcda2f8c7990214a7206fe9;hpb=a713e8258acc3f0e960c4e87ba8684902d29a591;p=dcpomatic.git diff --git a/src/wx/gdc_certificate_panel.cc b/src/wx/gdc_certificate_panel.cc index a4301087d..e670f01eb 100644 --- a/src/wx/gdc_certificate_panel.cc +++ b/src/wx/gdc_certificate_panel.cc @@ -28,6 +28,9 @@ using std::string; using boost::optional; using boost::bind; +#if BOOST_VERSION >= 106100 +using namespace boost::placeholders; +#endif GDCCertificatePanel::GDCCertificatePanel (DownloadCertificateDialog* dialog) : CredentialsDownloadCertificatePanel ( @@ -46,14 +49,19 @@ GDCCertificatePanel::GDCCertificatePanel (DownloadCertificateDialog* dialog) void GDCCertificatePanel::do_download () { + string serial = wx_to_std (_serial->GetValue()); + if (!serial.empty() && serial[0] == 'A') { + /* We're adding the A ourselves */ + serial = serial.substr(1); + } string const url = String::compose( "ftp://%1:%2@ftp.gdc-tech.com/SHA256/A%3.crt.pem", Config::instance()->gdc_username().get(), Config::instance()->gdc_password().get(), - wx_to_std(_serial->GetValue()) + serial ); - optional 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, this, _1, _2)); if (error) { _dialog->message()->SetLabel(wxT(""));