diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2017-03-15 09:36:23 +0100 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2017-03-15 10:56:50 +0000 |
commit | 763d5df50aa9e57356fb99f270e809f77aa47091 (patch) | |
tree | 72aeb84be8e4cabd6c4deb9ab600da85f342d6db /xmlsecurity | |
parent | d92d9e0d94fd8e9908eeae3717a7c835c85e80ae (diff) |
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@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'xmlsecurity')
-rw-r--r-- | xmlsecurity/source/dialogs/certificateviewer.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx b/xmlsecurity/source/dialogs/certificateviewer.cxx index 7361e253c614..7a68d030b25e 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(); } |