[Libreoffice-commits] core.git: xmlsecurity/source
Samuel Mehrbrodt
Samuel.Mehrbrodt at cib.de
Mon Jul 10 13:48:06 UTC 2017
xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx | 6 +++++-
xmlsecurity/source/dialogs/digitalsignaturesdialog.hrc | 1 +
xmlsecurity/source/dialogs/digitalsignaturesdialog.src | 5 +++++
3 files changed, 11 insertions(+), 1 deletion(-)
New commits:
commit 30f857246e9cea6c1879d52801dcb24c75b45d42
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
Date: Mon Jul 10 10:26:40 2017 +0200
Related tdf#108977 Fix crash when vieweing non-existing certificate
gpg4libre
Change-Id: If72c2ee818b67b48753ee293de4f02b4832b9d96
Reviewed-on: https://gerrit.libreoffice.org/39743
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index 37d0608d66c7..69a9a7d4ec60 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -724,13 +724,17 @@ void DigitalSignaturesDialog::ImplShowSignaturesDetails()
sal_uInt16 nSelected = (sal_uInt16) reinterpret_cast<sal_uIntPtr>( m_pSignaturesLB->FirstSelected()->GetUserData() );
const SignatureInformation& rInfo = maSignatureManager.maCurrentSignatureInformations[ nSelected ];
uno::Reference<security::XCertificate> xCert = getCertificate(rInfo);
- uno::Reference<xml::crypto::XSecurityEnvironment> xSecEnv = getSecurityEnvironmentForCertificate(xCert);
if ( xCert.is() )
{
+ uno::Reference<xml::crypto::XSecurityEnvironment> xSecEnv = getSecurityEnvironmentForCertificate(xCert);
ScopedVclPtrInstance<CertificateViewer> aViewer(this, xSecEnv, xCert, false);
aViewer->Execute();
}
+ else
+ {
+ ScopedVclPtrInstance<InfoBox>(nullptr, XsResId(STR_XMLSECDLG_NO_CERT_FOUND))->Execute();
+ }
}
}
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.hrc b/xmlsecurity/source/dialogs/digitalsignaturesdialog.hrc
index 4998defb3238..c56c26da96d1 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.hrc
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.hrc
@@ -28,6 +28,7 @@
#define STR_XMLSECDLG_QUERY_REALLYREMOVE (RID_DIGITALSIGNATUREDLG_START + 2)
#define STR_XMLSECDLG_SIGNING_FAILED (RID_DIGITALSIGNATUREDLG_START + 3)
#define STR_XMLSECDLG_NO_CERT_MANAGER (RID_DIGITALSIGNATUREDLG_START + 4)
+#define STR_XMLSECDLG_NO_CERT_FOUND (RID_DIGITALSIGNATUREDLG_START + 5)
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.src b/xmlsecurity/source/dialogs/digitalsignaturesdialog.src
index 2d4b4e0fb38e..a01f7d1a33b6 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.src
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.src
@@ -51,4 +51,9 @@ String STR_XMLSECDLG_NO_CERT_MANAGER
Text [ en-US ] = "Could not find any certificate manager.";
};
+String STR_XMLSECDLG_NO_CERT_FOUND
+{
+ Text [ en-US ] = "Could not find the certificate.";
+};
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list