[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - xmlsecurity/qa

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Thu Dec 10 11:58:28 UTC 2020


 xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 5fc2c93e69ddb2ab6b8061c1f23fa500224c4fa6
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Dec 4 12:58:20 2020 +0000
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Thu Dec 10 12:57:51 2020 +0100

    disable tests that don't work without pdfium
    
    we're probably past the end of the road on --disable-pdfium
    
    Change-Id: Id91ea6c77bbdb3ecf609a7ffd16a278eb3b17e91
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107223
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

diff --git a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
index 7659fe9485c5..68738134cc36 100644
--- a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
+++ b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
@@ -7,6 +7,8 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include <config_features.h>
+
 #include <com/sun/star/xml/crypto/SEInitializer.hpp>
 #include <com/sun/star/security/DocumentSignatureInformation.hpp>
 
@@ -414,6 +416,7 @@ CPPUNIT_TEST_FIXTURE(PDFSigningTest, testBadCertP1)
         = verify(m_directories.getURLFromSrc(DATA_DIRECTORY) + "bad-cert-p1.pdf", 1,
                  /*rExpectedSubFilter=*/OString());
     CPPUNIT_ASSERT(!aInfos.empty());
+#if HAVE_FEATURE_PDFIUM
     SignatureInformation& rInformation = aInfos[0];
     // Without the accompanying fix in place, this test would have failed with:
     // - Expected: 0 (SecurityOperationStatus_UNKNOWN)
@@ -421,6 +424,7 @@ CPPUNIT_TEST_FIXTURE(PDFSigningTest, testBadCertP1)
     // i.e. annotation after a P1 signature was not considered as a bad modification.
     CPPUNIT_ASSERT_EQUAL(xml::crypto::SecurityOperationStatus::SecurityOperationStatus_UNKNOWN,
                          rInformation.nStatus);
+#endif
 }
 
 CPPUNIT_TEST_FIXTURE(PDFSigningTest, testBadCertP3Stamp)
@@ -429,14 +433,15 @@ CPPUNIT_TEST_FIXTURE(PDFSigningTest, testBadCertP3Stamp)
         = verify(m_directories.getURLFromSrc(DATA_DIRECTORY) + "bad-cert-p3-stamp.pdf", 1,
                  /*rExpectedSubFilter=*/OString());
     CPPUNIT_ASSERT(!aInfos.empty());
+#if HAVE_FEATURE_PDFIUM
     SignatureInformation& rInformation = aInfos[0];
-
     // Without the accompanying fix in place, this test would have failed with:
     // - Expected: 0 (SecurityOperationStatus_UNKNOWN)
     // - Actual  : 1 (SecurityOperationStatus_OPERATION_SUCCEEDED)
     // i.e. adding a stamp annotation was not considered as a bad modification.
     CPPUNIT_ASSERT_EQUAL(xml::crypto::SecurityOperationStatus::SecurityOperationStatus_UNKNOWN,
                          rInformation.nStatus);
+#endif
 }
 
 /// Test writing a PAdES signature.


More information about the Libreoffice-commits mailing list