Add subject/issuer details to the screen dialog (#2422).
authorCarl Hetherington <cth@carlh.net>
Mon, 16 Jan 2023 20:20:02 +0000 (21:20 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 16 Jan 2023 20:20:14 +0000 (21:20 +0100)
cscript
src/wx/screen_dialog.cc
src/wx/screen_dialog.h

diff --git a/cscript b/cscript
index 839405e45a45ee12e8c81bbbad2364078accfd71..fd2e97ae5bdd563806296ecb0fd20a7561f6cad0 100644 (file)
--- a/cscript
+++ b/cscript
@@ -457,7 +457,7 @@ def dependencies(target, options):
         # Use distro-provided FFmpeg on Arch
         deps = []
 
-    deps.append(('libdcp', 'v1.8.51'))
+    deps.append(('libdcp', 'v1.8.52'))
     deps.append(('libsub', 'v1.6.42'))
     deps.append(('leqm-nrt', '93ae9e6'))
     deps.append(('rtaudio', 'f619b76'))
index 7323f655ca6f035edee5f3a059f1a5973268b2e3..b985888ea75972ec194f433fd64bccd00f6f4ee3 100644 (file)
@@ -143,7 +143,6 @@ ScreenDialog::ScreenDialog (
        auto s = new wxBoxSizer (wxHORIZONTAL);
        _recipient_thumbprint = new StaticText (this, wxT (""), wxDefaultPosition, size);
        _recipient_thumbprint->SetFont (font);
-       set_recipient (recipient);
 
        _get_recipient_from_file = new Button (this, _("Get from file..."));
        _download_recipient = new Button (this, _("Download..."));
@@ -159,6 +158,28 @@ ScreenDialog::ScreenDialog (
        _sizer->Add (_recipient_file, wxGBPosition(r, 1), wxDefaultSpan, wxALIGN_CENTER_VERTICAL, DCPOMATIC_SIZER_Y_GAP);
        ++r;
 
+       add_label_to_sizer(_sizer, this, _("Subject common name"), true, wxGBPosition(r, 0));
+       _subject_common_name = new wxStaticText(this, wxID_ANY, wxT(""));
+       _sizer->Add(_subject_common_name, wxGBPosition(r, 1), wxDefaultSpan, wxALIGN_CENTER_VERTICAL, DCPOMATIC_SIZER_Y_GAP);
+       ++r;
+
+       add_label_to_sizer(_sizer, this, _("Subject organization name"), true, wxGBPosition(r, 0));
+       _subject_organization_name = new wxStaticText(this, wxID_ANY, wxT(""));
+       _sizer->Add(_subject_organization_name, wxGBPosition(r, 1), wxDefaultSpan, wxALIGN_CENTER_VERTICAL, DCPOMATIC_SIZER_Y_GAP);
+       ++r;
+
+       add_label_to_sizer(_sizer, this, _("Issuer common name"), true, wxGBPosition(r, 0));
+       _issuer_common_name = new wxStaticText(this, wxID_ANY, wxT(""));
+       _sizer->Add(_issuer_common_name, wxGBPosition(r, 1), wxDefaultSpan, wxALIGN_CENTER_VERTICAL, DCPOMATIC_SIZER_Y_GAP);
+       ++r;
+
+       add_label_to_sizer(_sizer, this, _("Issuer organization name"), true, wxGBPosition(r, 0));
+       _issuer_organization_name = new wxStaticText(this, wxID_ANY, wxT(""));
+       _sizer->Add(_issuer_organization_name, wxGBPosition(r, 1), wxDefaultSpan, wxALIGN_CENTER_VERTICAL, DCPOMATIC_SIZER_Y_GAP);
+       ++r;
+
+       set_recipient (recipient);
+
        {
                int flags = wxALIGN_CENTER_VERTICAL | wxTOP;
 #ifdef __WXOSX__
@@ -297,6 +318,10 @@ ScreenDialog::set_recipient (optional<dcp::Certificate> r)
 
        if (_recipient) {
                _recipient_thumbprint->SetLabel (std_to_wx (_recipient->thumbprint ()));
+               _subject_common_name->SetLabel(std_to_wx(_recipient->subject_common_name()));
+               _subject_organization_name->SetLabel(std_to_wx(_recipient->subject_organization_name()));
+               _issuer_common_name->SetLabel(std_to_wx(_recipient->issuer_common_name()));
+               _issuer_organization_name->SetLabel(std_to_wx(_recipient->issuer_organization_name()));
                _sizer->Layout ();
        }
 }
index e623f3889fab40a772df8be44a8a36a622ff91cd..0069b9fa321d56e0685d534d73f1fd8d2ea28e32 100644 (file)
@@ -71,6 +71,10 @@ private:
        wxTextCtrl* _notes;
        wxStaticText* _recipient_thumbprint;
        wxStaticText* _recipient_file;
+       wxStaticText* _subject_common_name;
+       wxStaticText* _subject_organization_name;
+       wxStaticText* _issuer_common_name;
+       wxStaticText* _issuer_organization_name;
        wxButton* _get_recipient_from_file;
        wxButton* _download_recipient;
        EditableList<TrustedDevice, TrustedDeviceDialog>* _trusted_device_list;