X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fdownload_certificate_panel.cc;h=b3de4ca2c427e16aa8981dd78ff13432073adae7;hb=db845a29ef318bc08c4d713c4c47ec5203867c0d;hp=c30b050081db913327807ff6ec36ae66fa075892;hpb=8963f0007af1a312017b9627c18b82ec2a577591;p=dcpomatic.git diff --git a/src/wx/download_certificate_panel.cc b/src/wx/download_certificate_panel.cc index c30b05008..b3de4ca2c 100644 --- a/src/wx/download_certificate_panel.cc +++ b/src/wx/download_certificate_panel.cc @@ -58,10 +58,11 @@ DownloadCertificatePanel::DownloadCertificatePanel (DownloadCertificateDialog* d optional -DownloadCertificatePanel::load_certificate (boost::filesystem::path file) +DownloadCertificatePanel::load_certificate (boost::filesystem::path file, string url) { try { _certificate = dcp::Certificate (dcp::file_to_string(file)); + _url = url; } catch (dcp::MiscError& e) { return String::compose(wx_to_std(_("Could not read certificate file (%1)")), e.what()); } @@ -70,10 +71,11 @@ DownloadCertificatePanel::load_certificate (boost::filesystem::path file) optional -DownloadCertificatePanel::load_certificate_from_chain (boost::filesystem::path file) +DownloadCertificatePanel::load_certificate_from_chain (boost::filesystem::path file, string url) { try { _certificate = dcp::CertificateChain (dcp::file_to_string(file)).leaf(); + _url = url; } catch (dcp::MiscError& e) { return String::compose(wx_to_std(_("Could not read certificate file (%1)")), e.what()); } @@ -88,6 +90,14 @@ DownloadCertificatePanel::certificate () const } + +optional +DownloadCertificatePanel::url () const +{ + return _url; + +} + void DownloadCertificatePanel::download () {