diff options
author | Gautam Prajapati <gautamprajapati06@gmail.com> | 2017-08-18 23:17:15 +0530 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-08-23 17:50:55 +0200 |
commit | 511ae02c6457e69cb6daab871acd9c3e7d64e2e3 (patch) | |
tree | b55634866b626b9c8258a902fa78f5ee901eb900 /xmlsecurity | |
parent | f8fa4631f35799f1afeec2ecba7eec5bbdba95e5 (diff) |
Android: Enable HAVE_FEATURE_NSS and package the NSS libraries with apk
This commit enables HAVE_FEATURE_NSS for Android and fixes the svl/ vcl/
and xmlsecurity/ module to use NSS.
xmlsecurity/ wasn't built for Android previously, this commit enables
building xmlsecurity/ for Android and disables the support of gpgme
in the same module(Only for Android).
It also enables the linking of NSS shared libraries with
liblo-native-code.so and adds a rule to package them along with the apk.
Change-Id: I7d0341688ac979ae92e9145c37dd107670417fe1
Reviewed-on: https://gerrit.libreoffice.org/41308
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'xmlsecurity')
-rw-r--r-- | xmlsecurity/Library_xmlsecurity.mk | 2 | ||||
-rw-r--r-- | xmlsecurity/Library_xsec_xmlsec.mk | 9 | ||||
-rw-r--r-- | xmlsecurity/Module_xmlsecurity.mk | 2 | ||||
-rw-r--r-- | xmlsecurity/source/helper/documentsignaturemanager.cxx | 4 | ||||
-rw-r--r-- | xmlsecurity/source/helper/xsecctl.cxx | 4 | ||||
-rw-r--r-- | xmlsecurity/source/helper/xsecverify.cxx | 2 | ||||
-rw-r--r-- | xmlsecurity/source/xmlsec/xsec_xmlsec.cxx | 4 |
7 files changed, 8 insertions, 19 deletions
diff --git a/xmlsecurity/Library_xmlsecurity.mk b/xmlsecurity/Library_xmlsecurity.mk index 77d3bd81dc3b..22d27c717155 100644 --- a/xmlsecurity/Library_xmlsecurity.mk +++ b/xmlsecurity/Library_xmlsecurity.mk @@ -79,7 +79,7 @@ $(eval $(call gb_Library_use_system_win32_libs,xmlsecurity,\ crypt32 \ )) else -ifneq (,$(filter DESKTOP,$(BUILD_TYPE))) +ifneq (,$(filter DESKTOP,$(BUILD_TYPE))$(filter ANDROID,$(OS))) $(eval $(call gb_Library_add_defs,xmlsecurity,\ -DXMLSEC_CRYPTO_NSS \ )) diff --git a/xmlsecurity/Library_xsec_xmlsec.mk b/xmlsecurity/Library_xsec_xmlsec.mk index d7526d6af269..51f0f2a0834f 100644 --- a/xmlsecurity/Library_xsec_xmlsec.mk +++ b/xmlsecurity/Library_xsec_xmlsec.mk @@ -126,13 +126,6 @@ $(eval $(call gb_Library_add_defs,xsec_xmlsec,\ -DXMLSEC_CRYPTO_NSS \ )) -ifeq ($(OS),ANDROID) -$(eval $(call gb_Library_add_libs,xsec_xmlsec,\ - $(call gb_UnpackedTarball_get_dir,xmlsec)/src/openssl/.libs/libxmlsec1-openssl.a \ - $(call gb_UnpackedTarball_get_dir,xmlsec)/src/.libs/libxmlsec1.a \ -)) -else - ifeq ($(SYSTEM_XMLSEC),) $(eval $(call gb_Library_add_libs,xsec_xmlsec,\ $(call gb_UnpackedTarball_get_dir,xmlsec)/src/nss/.libs/libxmlsec1-nss.a \ @@ -140,8 +133,6 @@ $(eval $(call gb_Library_add_libs,xsec_xmlsec,\ )) endif -endif - $(eval $(call gb_Library_use_externals,xsec_xmlsec,\ plc4 \ )) diff --git a/xmlsecurity/Module_xmlsecurity.mk b/xmlsecurity/Module_xmlsecurity.mk index 23435b0512a9..693abbb80a0f 100644 --- a/xmlsecurity/Module_xmlsecurity.mk +++ b/xmlsecurity/Module_xmlsecurity.mk @@ -10,8 +10,6 @@ $(eval $(call gb_Module_Module,xmlsecurity)) ifeq ($(ENABLE_NSS),TRUE) -#FIXME: ^^^, get nss&libxmlsec building on ios and android -#chromium has patches to build statically FWIW $(eval $(call gb_Module_add_targets,xmlsecurity,\ Library_xmlsecurity \ diff --git a/xmlsecurity/source/helper/documentsignaturemanager.cxx b/xmlsecurity/source/helper/documentsignaturemanager.cxx index f39fe39a68b2..f886b4654dd7 100644 --- a/xmlsecurity/source/helper/documentsignaturemanager.cxx +++ b/xmlsecurity/source/helper/documentsignaturemanager.cxx @@ -64,14 +64,14 @@ bool DocumentSignatureManager::init() initXmlSec(); mxSEInitializer = xml::crypto::SEInitializer::create(mxContext); -#if !defined(MACOSX) && !defined(WNT) +#if !defined(MACOSX) && !defined(WNT) && !defined(ANDROID) mxGpgSEInitializer.set(new SEInitializerGpg()); #endif if (mxSEInitializer.is()) mxSecurityContext = mxSEInitializer->createSecurityContext(OUString()); -#if !defined(MACOSX) && !defined(WNT) +#if !defined(MACOSX) && !defined(WNT) && !defined(ANDROID) if (mxGpgSEInitializer.is()) mxGpgSecurityContext = mxGpgSEInitializer->createSecurityContext(OUString()); diff --git a/xmlsecurity/source/helper/xsecctl.cxx b/xmlsecurity/source/helper/xsecctl.cxx index e583ff72dab1..37fbb225c1f9 100644 --- a/xmlsecurity/source/helper/xsecctl.cxx +++ b/xmlsecurity/source/helper/xsecctl.cxx @@ -22,7 +22,7 @@ #include "documentsignaturehelper.hxx" #include "framework/saxeventkeeperimpl.hxx" #include "xmlsec/xmldocumentwrapper_xmlsecimpl.hxx" -#if !defined(MACOSX) && !defined(WNT) +#if !defined(MACOSX) && !defined(WNT) && !defined(ANDROID) # include "gpg/xmlsignature_gpgimpl.hxx" #endif @@ -127,7 +127,7 @@ void XSecController::createXSecComponent( ) cssu::Reference< cssl::XMultiComponentFactory > xMCF( mxCtx->getServiceManager() ); -#if !defined(MACOSX) && !defined(WNT) +#if !defined(MACOSX) && !defined(WNT) && !defined(ANDROID) uno::Reference< lang::XServiceInfo > xServiceInfo( m_xSecurityContext, cssu::UNO_QUERY ); if (xServiceInfo->getImplementationName() == "com.sun.star.xml.security.gpg.XMLSecurityContext_GpgImpl") m_xXMLSignature.set(new XMLSignature_GpgImpl()); diff --git a/xmlsecurity/source/helper/xsecverify.cxx b/xmlsecurity/source/helper/xsecverify.cxx index c60bbde22894..3ec123bc4029 100644 --- a/xmlsecurity/source/helper/xsecverify.cxx +++ b/xmlsecurity/source/helper/xsecverify.cxx @@ -110,7 +110,7 @@ void XSecController::addSignature() void XSecController::switchGpgSignature() { -#if !defined(MACOSX) && !defined(WNT) +#if !defined(MACOSX) && !defined(WNT) && !defined(ANDROID) // swap signature verifier for the Gpg one m_xXMLSignature.set(new XMLSignature_GpgImpl()); if (!m_vInternalSignatureInformations.empty()) diff --git a/xmlsecurity/source/xmlsec/xsec_xmlsec.cxx b/xmlsecurity/source/xmlsec/xsec_xmlsec.cxx index b480b90a9235..2a700cc59d62 100644 --- a/xmlsecurity/source/xmlsec/xsec_xmlsec.cxx +++ b/xmlsecurity/source/xmlsec/xsec_xmlsec.cxx @@ -27,7 +27,7 @@ #include "xmlsec/xmldocumentwrapper_xmlsecimpl.hxx" #include "xsec_xmlsec.hxx" -#if !defined(MACOSX) && !defined(WNT) +#if !defined(MACOSX) && !defined(WNT) && !defined(ANDROID) # include "gpg/xmlsignature_gpgimpl.hxx" #endif @@ -44,7 +44,7 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL xsec_xmlsec_component_getFactory( const sal_ Reference< XInterface > xFactory ; if( pImplName != nullptr ) { -#if !defined(MACOSX) && !defined(WNT) +#if !defined(MACOSX) && !defined(WNT) && !defined(ANDROID) if( XMLSignature_GpgImpl::impl_getImplementationName().equalsAscii( pImplName ) ) { xFactory = XMLSignature_GpgImpl::impl_createFactory( static_cast< XMultiServiceFactory* >( pServiceManager ) ) ; |