xmlsecurity/inc/certificateviewer.hxx | 1 xmlsecurity/source/dialogs/certificateviewer.cxx | 2 + xmlsecurity/uiconfig/ui/certgeneral.ui | 31 +++++++++++++++++++++-- 3 files changed, 32 insertions(+), 2 deletions(-)
New commits: commit 156c3c1e5a32d5eee507c3d776574af272f52d21 Author: Moritz Duge <moritz.d...@allotropia.de> AuthorDate: Mon Aug 5 16:31:17 2024 +0200 Commit: Sarper Akdemir <sarper.akde...@allotropia.de> CommitDate: Thu Aug 8 10:34:29 2024 +0200 tdf#161909: Show key type in CertificateViewer. Change-Id: I4277e342c573525dd668d0365b1d686fe33fd914 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171500 Reviewed-by: Moritz Duge <moritz.d...@allotropia.de> Reviewed-by: Sarper Akdemir <sarper.akde...@allotropia.de> Tested-by: Jenkins diff --git a/xmlsecurity/inc/certificateviewer.hxx b/xmlsecurity/inc/certificateviewer.hxx index 2db66ddba2db..ec8466872c5d 100644 --- a/xmlsecurity/inc/certificateviewer.hxx +++ b/xmlsecurity/inc/certificateviewer.hxx @@ -82,6 +82,7 @@ private: std::unique_ptr<weld::Label> m_xIssuedByFT; std::unique_ptr<weld::Label> m_xValidFromDateFT; std::unique_ptr<weld::Label> m_xValidToDateFT; + std::unique_ptr<weld::Label> m_xKeyTypeFT; std::unique_ptr<weld::Image> m_xKeyImg; std::unique_ptr<weld::Label> m_xHintCorrespPrivKeyFT; diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx b/xmlsecurity/source/dialogs/certificateviewer.cxx index f0a763dd6251..5ef8449bff08 100644 --- a/xmlsecurity/source/dialogs/certificateviewer.cxx +++ b/xmlsecurity/source/dialogs/certificateviewer.cxx @@ -92,6 +92,7 @@ CertificateViewerGeneralTP::CertificateViewerGeneralTP(weld::Container* pParent, , m_xIssuedByFT(mxBuilder->weld_label(u"issued_by_value"_ustr)) , m_xValidFromDateFT(mxBuilder->weld_label(u"valid_from_value"_ustr)) , m_xValidToDateFT(mxBuilder->weld_label(u"valid_to_value"_ustr)) + , m_xKeyTypeFT(mxBuilder->weld_label(u"key_type_value"_ustr)) , m_xKeyImg(mxBuilder->weld_image(u"keyimage"_ustr)) , m_xHintCorrespPrivKeyFT(mxBuilder->weld_label(u"privatekey"_ustr)) { @@ -131,6 +132,7 @@ CertificateViewerGeneralTP::CertificateViewerGeneralTP(weld::Container* pParent, m_xValidFromDateFT->set_label(sValidFromDate); m_xValidToDateFT->set_label(sValidToDate); + m_xKeyTypeFT->set_label(xmlsec::GetCertificateKind(xCert->getCertificateKind())); // Check if we have the private key... bool bHasPrivateKey = false; diff --git a/xmlsecurity/uiconfig/ui/certgeneral.ui b/xmlsecurity/uiconfig/ui/certgeneral.ui index d17ba09a5044..f21aee80a6a6 100644 --- a/xmlsecurity/uiconfig/ui/certgeneral.ui +++ b/xmlsecurity/uiconfig/ui/certgeneral.ui @@ -96,7 +96,7 @@ </packing> </child> <child> - <!-- n-columns=2 n-rows=5 --> + <!-- n-columns=2 n-rows=6 --> <object class="GtkGrid" id="grid1"> <property name="visible">True</property> <property name="can-focus">False</property> @@ -202,7 +202,7 @@ </object> <packing> <property name="left-attach">0</property> - <property name="top-attach">4</property> + <property name="top-attach">5</property> <property name="width">2</property> </packing> </child> @@ -243,6 +243,33 @@ <property name="top-attach">3</property> </packing> </child> + <child> + <object class="GtkLabel" id="key_type"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="label" translatable="yes" context="certgeneral|type">Key type: </property> + <property name="xalign">0</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">4</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="key_type_value"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="hexpand">True</property> + <property name="xalign">0</property> + </object> + <packing> + <property name="left-attach">1</property> + <property name="top-attach">4</property> + </packing> + </child> </object> <packing> <property name="expand">False</property>