xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 90b725675c2964f4a151d802d9afedd8bc2ae1a7 Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Fri Feb 26 19:25:18 2021 +0100 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Wed Mar 3 12:47:30 2021 +0100 xmlsecurity: avoid exception in DigitalSignaturesDialog::getCertificate() Fallback to PGP if there's no X509 signing certificate because CheckX509Data() failed prevents the dialog from popping up. To avoid confusing the user in this situation, the dialog should show no certificate, which is already the case. Change-Id: I7f382165657f50723ac65a60309567e5b6c5ae1b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111664 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx index 044676688389..e6ca398e3c80 100644 --- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx +++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx @@ -723,7 +723,7 @@ uno::Reference<security::XCertificate> DigitalSignaturesDialog::getCertificate(c xCert = xSecEnv->getCertificate(rInfo.GetSigningCertificate()->X509IssuerName, xmlsecurity::numericStringToBigInteger(rInfo.GetSigningCertificate()->X509SerialNumber)); } - if (!xCert.is() && xGpgSecEnv.is()) + if (!xCert.is() && xGpgSecEnv.is() && !rInfo.ouGpgKeyID.isEmpty()) xCert = xGpgSecEnv->getCertificate( rInfo.ouGpgKeyID, xmlsecurity::numericStringToBigInteger(u"") ); SAL_WARN_IF( !xCert.is(), "xmlsecurity.dialogs", "Certificate not found and can't be created!" ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits