[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-1' - xmlsecurity/source

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Tue Sep 8 08:52:05 UTC 2020


 xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx |   13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

New commits:
commit 1f7a2f913af1173d22a1bb1c9e2d014226f6c4d5
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon Aug 31 13:34:17 2020 +0200
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Tue Sep 8 10:50:25 2020 +0200

    xmlsecurity: fix infobar vs signature dialog inconsistency
    
    The infobar mentioned if a signature is partial, but the dialog just has
    a bool UI for signatures. Then present "good, but partial" as "bad".
    
    (cherry picked from commit 3ba1144cb96c710e665ffb3ada26fb6a48a03472)
    
    Change-Id: I698190aa77702000b11d635bd038d9c9a91614ac
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101844
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 8696c20cbf5c816ded9fee469616cb693b4572b0)
    
    Conflicts:
            xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx

diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index bd2e2dedb3d9..7edf92536e86 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -626,8 +626,17 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox()
 
             if ( bSigValid )
             {
-                 bSigValid = DocumentSignatureHelper::checkIfAllFilesAreSigned(
-                      aElementsToBeVerified, rInfo, mode);
+                if (maSignatureManager.getStore().is())
+                {
+                    // XML based.
+                    bSigValid = DocumentSignatureHelper::checkIfAllFilesAreSigned(
+                          aElementsToBeVerified, rInfo, mode);
+                }
+                else
+                {
+                    // Assume PDF.
+                    bSigValid = !rInfo.bPartialDocumentSignature;
+                }
 
                 if( bSigValid )
                     nValidSigs++;


More information about the Libreoffice-commits mailing list