summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-08-02 09:10:32 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-08-02 08:40:05 +0000
commit6d40c515fdf86d807c199ff4179b9c862a9fe5b2 (patch)
tree53edc46fc7fa083a77a8f714be08aca8aae73eae /xmlsecurity
parent010a2a8ed3214380d514be56171c974f99010bc1 (diff)
libxmlsec: drop xmlsec1-keyinfo-revert.patch.1 completely
And instead attempt to set up the test environment correctly. Change-Id: I06c10b96749c0464da8d2dd9a59b48f16baeead5 Reviewed-on: https://gerrit.libreoffice.org/27785 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/qa/unit/signing/data/cert8.dbbin0 -> 65536 bytes
-rw-r--r--xmlsecurity/qa/unit/signing/signing.cxx10
-rw-r--r--xmlsecurity/source/helper/documentsignaturemanager.cxx5
-rw-r--r--xmlsecurity/source/helper/ooxmlsecexporter.cxx5
4 files changed, 11 insertions, 9 deletions
diff --git a/xmlsecurity/qa/unit/signing/data/cert8.db b/xmlsecurity/qa/unit/signing/data/cert8.db
new file mode 100644
index 000000000000..8354fd309e3a
--- /dev/null
+++ b/xmlsecurity/qa/unit/signing/data/cert8.db
Binary files differ
diff --git a/xmlsecurity/qa/unit/signing/signing.cxx b/xmlsecurity/qa/unit/signing/signing.cxx
index 7065d0d53e6c..adf2a7b677b0 100644
--- a/xmlsecurity/qa/unit/signing/signing.cxx
+++ b/xmlsecurity/qa/unit/signing/signing.cxx
@@ -110,6 +110,16 @@ void SigningTest::setUp()
mxComponentContext.set(comphelper::getComponentContext(getMultiServiceFactory()));
mxDesktop.set(frame::Desktop::create(mxComponentContext));
+
+#ifndef _WIN32
+ // Set up cert8.db in workdir/CppunitTest/
+ OUString aSourceDir = m_directories.getURLFromSrc(DATA_DIRECTORY);
+ OUString aTargetDir = m_directories.getURLFromWorkdir("/CppunitTest/");
+ osl::File::copy(aSourceDir + "cert8.db", aTargetDir + "cert8.db");
+ OUString aTargetPath;
+ osl::FileBase::getSystemPathFromFileURL(aTargetDir, aTargetPath);
+ setenv("MOZILLA_CERTIFICATE_FOLDER", aTargetPath.toUtf8().getStr(), 1);
+#endif
}
void SigningTest::tearDown()
diff --git a/xmlsecurity/source/helper/documentsignaturemanager.cxx b/xmlsecurity/source/helper/documentsignaturemanager.cxx
index 3c8f7d596b03..a947ed55f745 100644
--- a/xmlsecurity/source/helper/documentsignaturemanager.cxx
+++ b/xmlsecurity/source/helper/documentsignaturemanager.cxx
@@ -56,11 +56,6 @@ bool DocumentSignatureManager::isXML(const OUString& rURI)
{
SAL_WARN_IF(!mxStore.is(), "xmlsecurity.helper", "empty storage reference");
- // FIXME figure out why this is necessary.
- static bool bTest = getenv("LO_TESTNAME");
- if (bTest)
- return true;
-
bool bIsXML = false;
bool bPropsAvailable = false;
const OUString sPropFullPath("FullPath");
diff --git a/xmlsecurity/source/helper/ooxmlsecexporter.cxx b/xmlsecurity/source/helper/ooxmlsecexporter.cxx
index 590d33ead7aa..9b71c3ccaa4f 100644
--- a/xmlsecurity/source/helper/ooxmlsecexporter.cxx
+++ b/xmlsecurity/source/helper/ooxmlsecexporter.cxx
@@ -421,10 +421,7 @@ void OOXMLSecExporter::Impl::writePackageSignature()
m_xDocumentHandler->startElement(NSTAG_XD ":" TAG_QUALIFYINGPROPERTIES, uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
}
- // FIXME why does this part crash NSS when MOZILLA_CERTIFICATE_FOLDER is not set?
- static bool bTest = getenv("LO_TESTNAME");
- if (!bTest)
- writeSignedProperties();
+ writeSignedProperties();
m_xDocumentHandler->endElement(NSTAG_XD ":" TAG_QUALIFYINGPROPERTIES);
m_xDocumentHandler->endElement(TAG_OBJECT);