summaryrefslogtreecommitdiff
path: root/src/wx/download_certificate_panel.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-01-21 23:39:03 +0100
committerCarl Hetherington <cth@carlh.net>2022-03-09 17:04:02 +0100
commit2fd641547b5fb795fc17e98e47f489fa82e8ff42 (patch)
treeebfd84898df8e1eabaaa2888c89e0c71137cb301 /src/wx/download_certificate_panel.cc
parentcf65c2709664936940935996499ac87dc47515f0 (diff)
Display the filename / URL that a screen certificate was obtained from (#1894).
Diffstat (limited to 'src/wx/download_certificate_panel.cc')
-rw-r--r--src/wx/download_certificate_panel.cc14
1 files changed, 12 insertions, 2 deletions
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<string>
-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<string>
-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<string>
+DownloadCertificatePanel::url () const
+{
+ return _url;
+
+}
+
void
DownloadCertificatePanel::download ()
{