summaryrefslogtreecommitdiffstats
path: root/xmlsecurity/source
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2020-09-18 12:23:44 +0300
committerTor Lillqvist <tml@collabora.com>2020-09-22 22:01:31 +0200
commitef56e2e2b4cf45e093a848b352a5edbf87efe8ab (patch)
tree43ca299d49227259ab9be6785545261e1f24cfa5 /xmlsecurity/source
parentResolves: tdf#128318 'Standard' buttons should not be shown by default (diff)
downloadcore-ef56e2e2b4cf45e093a848b352a5edbf87efe8ab.tar.gz
core-ef56e2e2b4cf45e093a848b352a5edbf87efe8ab.zip
tdf#128136: Build curl, nss, and xmlsec for iOS, too
We must link nss statically, including the three dylibs that normally are loaded at run-time, because including bare dylibs in an iOS appp on the App Store is not OK. See https://developer.apple.com/forums/thread/125796 . For linking the softokn3 library statically, NSS already had code, behind NSS_STATIC_SOFTOKEN ifdefs. Introduce two more macros: NSS_STATIC_FREEBL for the freebl library and NSS_STATIC_PKCS11 for the nssckbi library. Turn off parallelism for the sub-make building nss. There seems to be race conditions or something when running simultaneous instances of the nsinstall.py script or the nsinstall program in nss (used when building nss for the build platform). When cross-compiling from macOS, use python3 to run the nsinstall.py script, as it is Python 3. Change-Id: Idd427b5ebf21f802b3feb0d5a3d259317ba8fc67 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103152 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'xmlsecurity/source')
-rw-r--r--xmlsecurity/source/xmlsec/nss/nssinitializer.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
index 534c5bd7fc5c..b2fd04423be9 100644
--- a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
+++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
@@ -404,12 +404,17 @@ bool nsscrypto_initialize(css::uno::Reference<css::uno::XComponentContext> const
#ifdef XMLSEC_CRYPTO_NSS
bool return_value = true;
-#if defined SYSTEM_NSS
+#if defined SYSTEM_NSS || defined IOS // The statically linked nss on iOS acts as a "system" nss in this regards
if (!SECMOD_HasRootCerts())
#endif
{
deleteRootsModule();
+#ifdef IOS // Use statically linked NSS
+ OUString rootModulePath("NSSCKBI");
+
+ if (true)
+#else
#if defined SYSTEM_NSS
OUString rootModule("libnssckbi" SAL_DLLEXTENSION);
#else
@@ -419,6 +424,7 @@ bool nsscrypto_initialize(css::uno::Reference<css::uno::XComponentContext> const
OUString rootModulePath;
if (::osl::File::E_None == ::osl::File::getSystemPathFromFileURL(rootModule, rootModulePath))
+#endif
{
OString ospath = OUStringToOString(rootModulePath, osl_getThreadTextEncoding());
OString aStr = "name=\"" ROOT_CERTS "\" library=\"" + ospath + "\"";