summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-12-04 12:58:20 +0000
committerXisco Fauli <xiscofauli@libreoffice.org>2020-12-10 12:57:51 +0100
commit5fc2c93e69ddb2ab6b8061c1f23fa500224c4fa6 (patch)
tree2eb27945a718229d70cf32bea7455b6ad54166b5 /xmlsecurity
parent9ee46e08c3155a59062d5d4975becc8b92d41626 (diff)
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@libreoffice.org>
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx7
1 files changed, 6 insertions, 1 deletions
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.