diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-07-04 15:19:35 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-07-05 09:37:13 +0000 |
commit | 58fa9256ec012bf0e4aa4c668056191a0d24e2a1 (patch) | |
tree | 16f85997089b2c457e12dfeaf6ef16af61ee2c01 /xmlsecurity | |
parent | f2f076aff2d1d21958b55938cd55f65f0d5a0aa4 (diff) |
Certificate viewer dialog can have various kinds of parents
...like the "Security Warning: Domain Name Mismatch" WarnDialog (cf.
TITLE_UUI_SSLWARN_DOMAINMISMATCH in uui), not only a CertificateChooser.
Regression introduced with c42be58e4c006ab3e1f262b644789cba8659d0ab "Show the
certificate use also in the View Certificate dialog", for which this fix is
hopefully fine.
Change-Id: I6efced1ebaad07c314fe7a5dd1cdc8e91d34555e
(cherry picked from commit d746a99558a3f9c8625988ed87264ff12b355859)
Reviewed-on: https://gerrit.libreoffice.org/26908
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'xmlsecurity')
-rw-r--r-- | xmlsecurity/source/dialogs/certificateviewer.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx b/xmlsecurity/source/dialogs/certificateviewer.cxx index 9c4e39767f87..24e28591d744 100644 --- a/xmlsecurity/source/dialogs/certificateviewer.cxx +++ b/xmlsecurity/source/dialogs/certificateviewer.cxx @@ -280,9 +280,11 @@ CertificateViewerDetailsTP::CertificateViewerDetailsTP( vcl::Window* _pParent, C InsertElement( XMLSEC_RES( STR_SIGNATURE_ALGO ), aLBEntry, aDetails ); CertificateChooser* pChooser = dynamic_cast<CertificateChooser*>(mpDlg->GetParent()); - assert(pChooser); - aLBEntry = pChooser->UsageInClearText( mpDlg->mxCert->getCertificateUsage() ); - InsertElement( XMLSEC_RES( STR_USE ), aLBEntry, aLBEntry ); + if (pChooser) + { + aLBEntry = pChooser->UsageInClearText( mpDlg->mxCert->getCertificateUsage() ); + InsertElement( XMLSEC_RES( STR_USE ), aLBEntry, aLBEntry ); + } aSeq = xCert->getSHA1Thumbprint(); aLBEntry = XmlSec::GetHexString( aSeq, pHexSep ); |