[Libreoffice-commits] core.git: xmlsecurity/source
Samuel Mehrbrodt
Samuel.Mehrbrodt at cib.de
Wed Mar 15 10:57:31 UTC 2017
xmlsecurity/source/dialogs/certificateviewer.cxx | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 763d5df50aa9e57356fb99f270e809f77aa47091
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
Date: Wed Mar 15 09:36:23 2017 +0100
gpg4libre: Don't show certificate path when there is no hierarchy
Gpg private keys have no parents
Change-Id: Ie41269c3c49569ea142a01c8eef0f58a636d9eb7
Reviewed-on: https://gerrit.libreoffice.org/35208
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx b/xmlsecurity/source/dialogs/certificateviewer.cxx
index 7361e25..7a68d03 100644
--- a/xmlsecurity/source/dialogs/certificateviewer.cxx
+++ b/xmlsecurity/source/dialogs/certificateviewer.cxx
@@ -56,7 +56,10 @@ CertificateViewer::CertificateViewer(
mpTabCtrl->SetTabPage(mnGeneralId, VclPtr<CertificateViewerGeneralTP>::Create( mpTabCtrl, this));
mpTabCtrl->SetTabPage(mnDetailsId, VclPtr<CertificateViewerDetailsTP>::Create( mpTabCtrl, this));
- mpTabCtrl->SetTabPage(mnPathId, VclPtr<CertificateViewerCertPathTP>::Create( mpTabCtrl, this));
+ if (mxSecurityEnvironment->buildCertificatePath(mxCert).getLength() == 0)
+ mpTabCtrl->RemovePage(mnPathId);
+ else
+ mpTabCtrl->SetTabPage(mnPathId, VclPtr<CertificateViewerCertPathTP>::Create( mpTabCtrl, this));
mpTabCtrl->SetCurPageId(mnGeneralId);
}
@@ -69,7 +72,8 @@ void CertificateViewer::dispose()
{
mpTabCtrl->GetTabPage(mnGeneralId)->disposeOnce();
mpTabCtrl->GetTabPage(mnDetailsId)->disposeOnce();
- mpTabCtrl->GetTabPage(mnPathId)->disposeOnce();
+ if (mpTabCtrl->GetTabPage(mnPathId))
+ mpTabCtrl->GetTabPage(mnPathId)->disposeOnce();
mpTabCtrl.clear();
TabDialog::dispose();
}
More information about the Libreoffice-commits
mailing list