summaryrefslogtreecommitdiff
path: root/xmlsecurity/qa
diff options
context:
space:
mode:
authorRene Engelhard <rene@debian.org>2018-03-18 11:25:41 +0100
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2018-03-18 17:21:03 +0100
commitd7ecf4a4e37a9eeffa2b40f9fe5a2e6a8f90c876 (patch)
tree26cea37ed3ca6d89cfcd18b0b46d527f1b6731d3 /xmlsecurity/qa
parentf68929ac611fdda19c1ee413effc59d33aa5ef97 (diff)
properly check for gpgconf (and --create-socketdir) working
Change-Id: I21268e5950381845eb90bf66a42a99adc3821eaa Reviewed-on: https://gerrit.libreoffice.org/51493 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'xmlsecurity/qa')
-rw-r--r--xmlsecurity/qa/unit/signing/signing.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/xmlsecurity/qa/unit/signing/signing.cxx b/xmlsecurity/qa/unit/signing/signing.cxx
index 6efb6f02e029..b342adeeb80d 100644
--- a/xmlsecurity/qa/unit/signing/signing.cxx
+++ b/xmlsecurity/qa/unit/signing/signing.cxx
@@ -106,9 +106,11 @@ public:
void testODFBrokenStreamGPG();
/// Test a typical broken ODF signature where the XML dsig hash is corrupted.
void testODFBrokenDsigGPG();
+#if HAVE_GPGCONF_SOCKETDIR
/// Test loading an encrypted ODF document
void testODFEncryptedGPG();
#endif
+#endif
CPPUNIT_TEST_SUITE(SigningTest);
CPPUNIT_TEST(testDescription);
CPPUNIT_TEST(testODFGood);
@@ -136,8 +138,10 @@ public:
CPPUNIT_TEST(testODFUntrustedGoodGPG);
CPPUNIT_TEST(testODFBrokenStreamGPG);
CPPUNIT_TEST(testODFBrokenDsigGPG);
+#if HAVE_GPGCONF_SOCKETDIR
CPPUNIT_TEST(testODFEncryptedGPG);
#endif
+#endif
CPPUNIT_TEST_SUITE_END();
private:
@@ -736,6 +740,8 @@ void SigningTest::testODFBrokenDsigGPG()
CPPUNIT_ASSERT_EQUAL(static_cast<int>(SignatureState::BROKEN), static_cast<int>(pObjectShell->GetDocumentSignatureState()));
}
+#if HAVE_GPGCONF_SOCKETDIR
+
void SigningTest::testODFEncryptedGPG()
{
createDoc(m_directories.getURLFromSrc(DATA_DIRECTORY) + "encryptedGPG.odt");
@@ -747,6 +753,8 @@ void SigningTest::testODFEncryptedGPG()
#endif
+#endif
+
void SigningTest::registerNamespaces(xmlXPathContextPtr& pXmlXpathCtx)
{
xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("odfds"), BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:digitalsignature:1.0"));