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

New commits:
commit e1cfc9cd1b42d17db92e820d4c4c21cb4e8533e5
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Mon Aug 31 13:34:17 2020 +0200
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Mon Sep 7 09:51:37 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 <caol...@redhat.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102145
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx 
b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index d90bd33f9cfa..ff5161fb2754 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -605,8 +605,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++;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to