Switch OPENSSL config var from negative to positive
- align with most of the rest of config_host - rename DISABLE_OPENSSL to ENABLE_OPENSSL - make this configurable Change-Id: Ic3b41fcdda38db66134939f12265e0da24833d60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114564 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
This commit is contained in:
committed by
Thorsten Behrens
parent
983c412788
commit
013ddc4f53
@@ -1127,7 +1127,7 @@ $(eval $(call gb_Helper_register_mos,\
|
||||
vcl \
|
||||
wiz \
|
||||
wpt \
|
||||
$(if $(ENABLE_NSS),xsc) \
|
||||
$(if $(ENABLE_NSS)$(ENABLE_OPENSSL),xsc) \
|
||||
))
|
||||
|
||||
# UI configuration
|
||||
@@ -1174,7 +1174,7 @@ $(eval $(call gb_Helper_register_uiconfigs,\
|
||||
uui \
|
||||
vcl \
|
||||
writerperfect \
|
||||
$(if $(ENABLE_NSS),xmlsec) \
|
||||
$(if $(ENABLE_NSS)$(ENABLE_OPENSSL),xmlsec) \
|
||||
))
|
||||
|
||||
ifeq ($(gb_GBUILDSELFTEST),t)
|
||||
|
@@ -1566,13 +1566,13 @@ endef
|
||||
|
||||
endif # SYSTEM_HARFBUZZ
|
||||
|
||||
ifeq ($(DISABLE_OPENSSL),TRUE)
|
||||
ifneq ($(ENABLE_OPENSSL),TRUE)
|
||||
|
||||
gb_ExternalProject__use_openssl:=
|
||||
gb_LinkTarget__use_openssl_headers:=
|
||||
gb_LinkTarget__use_openssl:=
|
||||
|
||||
else # !DISABLE_OPENSSL
|
||||
else # ENABLE_OPENSSL
|
||||
|
||||
ifneq ($(SYSTEM_OPENSSL),)
|
||||
|
||||
@@ -1633,10 +1633,10 @@ endif
|
||||
endef
|
||||
|
||||
endif # SYSTEM_OPENSSL
|
||||
endif # DISABLE_OPENSSL
|
||||
endif # ENABLE_OPENSSL
|
||||
|
||||
|
||||
ifeq ($(DISABLE_OPENSSL),TRUE)
|
||||
ifneq ($(ENABLE_OPENSSL),TRUE)
|
||||
|
||||
define gb_LinkTarget__use_gnutls
|
||||
$(call gb_LinkTarget_set_include,$(1),\
|
||||
@@ -1662,12 +1662,12 @@ $(call gb_LinkTarget_add_libs,$(1),$(LIBGCRYPT_LIBS))
|
||||
|
||||
endef
|
||||
|
||||
else # !DISABLE_OPENSSL
|
||||
else # ENABLE_OPENSSL
|
||||
|
||||
gb_LinkTarget__use_gnutls:=
|
||||
gb_LinkTarget__use_libgcrypt:=
|
||||
|
||||
endif # DISABLE_OPENSSL
|
||||
endif # ENABLE_OPENSSL
|
||||
|
||||
|
||||
ifneq ($(SYSTEM_CDR),)
|
||||
|
@@ -121,7 +121,6 @@ export DEFAULT_BRAND_IMAGES=@DEFAULT_BRAND_IMAGES@
|
||||
export DICT_SYSTEM_DIR=@DICT_SYSTEM_DIR@
|
||||
export DISABLE_CVE_TESTS=@DISABLE_CVE_TESTS@
|
||||
export DISABLE_DYNLOADING=@DISABLE_DYNLOADING@
|
||||
export DISABLE_OPENSSL=@DISABLE_OPENSSL@
|
||||
export DISABLE_PYTHON=@DISABLE_PYTHON@
|
||||
export DLOPEN_LIBS=@DLOPEN_LIBS@
|
||||
export DLLTOOL=@DLLTOOL@
|
||||
@@ -177,6 +176,7 @@ export ENABLE_EXTENSION_UPDATE=@ENABLE_EXTENSION_UPDATE@
|
||||
export ENABLE_OOENV=@ENABLE_OOENV@
|
||||
export ENABLE_OPENGL_TRANSITIONS=@ENABLE_OPENGL_TRANSITIONS@
|
||||
export ENABLE_OPENGL_CANVAS=@ENABLE_OPENGL_CANVAS@
|
||||
export ENABLE_OPENSSL=@ENABLE_OPENSSL@
|
||||
export ENABLE_OPTIMIZED=@ENABLE_OPTIMIZED@
|
||||
export ENABLE_OPTIMIZED_DEBUG=@ENABLE_OPTIMIZED_DEBUG@
|
||||
export ENABLE_PCH=@ENABLE_PCH@
|
||||
|
@@ -10688,10 +10688,11 @@ fi
|
||||
dnl ===================================================================
|
||||
dnl Check for system openssl
|
||||
dnl ===================================================================
|
||||
DISABLE_OPENSSL=
|
||||
ENABLE_OPENSSL=
|
||||
AC_MSG_CHECKING([whether to disable OpenSSL usage])
|
||||
if test "$enable_openssl" = "yes"; then
|
||||
AC_MSG_RESULT([no])
|
||||
ENABLE_OPENSSL=TRUE
|
||||
if test "$_os" = Darwin ; then
|
||||
# OpenSSL is deprecated when building for 10.7 or later.
|
||||
#
|
||||
@@ -10719,16 +10720,15 @@ if test "$enable_openssl" = "yes"; then
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
DISABLE_OPENSSL=TRUE
|
||||
|
||||
# warn that although OpenSSL is disabled, system libraries may depend on it
|
||||
AC_MSG_WARN([OpenSSL has been disabled. No code compiled here will make use of it but system libraries may create indirect dependencies])
|
||||
add_warning "OpenSSL has been disabled. No code compiled here will make use of it but system libraries may create indirect dependencies"
|
||||
fi
|
||||
|
||||
AC_SUBST([DISABLE_OPENSSL])
|
||||
AC_SUBST([ENABLE_OPENSSL])
|
||||
|
||||
if test "$enable_cipher_openssl_backend" = yes && test "$DISABLE_OPENSSL" = TRUE; then
|
||||
if test "$enable_cipher_openssl_backend" = yes && test "$ENABLE_OPENSSL" != TRUE; then
|
||||
if test "$libo_fuzzed_enable_cipher_openssl_backend" = yes; then
|
||||
AC_MSG_NOTICE([Resetting --enable-cipher-openssl-backend=no])
|
||||
enable_cipher_openssl_backend=no
|
||||
|
4
external/neon/Library_neon.mk
vendored
4
external/neon/Library_neon.mk
vendored
@@ -49,7 +49,7 @@ $(eval $(call gb_Library_add_generated_cobjects,neon,\
|
||||
))
|
||||
|
||||
|
||||
ifneq ($(DISABLE_OPENSSL),TRUE)
|
||||
ifeq ($(ENABLE_OPENSSL),TRUE)
|
||||
$(eval $(call gb_Library_add_generated_cobjects,neon,\
|
||||
UnpackedTarball/neon/src/ne_openssl \
|
||||
))
|
||||
@@ -77,7 +77,7 @@ $(eval $(call gb_Library_add_generated_cobjects,neon,\
|
||||
))
|
||||
|
||||
else
|
||||
ifneq ($(DISABLE_OPENSSL),TRUE)
|
||||
ifeq ($(ENABLE_OPENSSL),TRUE)
|
||||
$(eval $(call gb_Library_add_generated_cobjects,neon,\
|
||||
UnpackedTarball/neon/src/ne_ntlm \
|
||||
))
|
||||
|
@@ -41,7 +41,7 @@ ifeq ($(SYSTEM_ZLIB),)
|
||||
postgresql_LDFLAGS += $(ZLIB_LIBS)
|
||||
endif
|
||||
|
||||
ifeq ($(DISABLE_OPENSSL),)
|
||||
ifeq ($(ENABLE_OPENSSL),TRUE)
|
||||
ifeq ($(SYSTEM_OPENSSL),)
|
||||
postgresql_CPPFLAGS += -I$(call gb_UnpackedTarball_get_dir,openssl)/include
|
||||
postgresql_LDFLAGS += -L$(call gb_UnpackedTarball_get_dir,openssl)/ $(if $(filter $(OS),LINUX),-pthread)
|
||||
@@ -70,7 +70,7 @@ $(call gb_ExternalProject_get_state_target,postgresql,build) :
|
||||
--without-zlib \
|
||||
--with-ldap \
|
||||
$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
|
||||
$(if $(DISABLE_OPENSSL),,--with-openssl \
|
||||
$(if $(ENABLE_OPENSSL),--with-openssl \
|
||||
$(if $(WITH_GSSAPI),--with-gssapi)) \
|
||||
$(if $(ENABLE_LDAP),,--with-ldap=no) \
|
||||
CFLAGS="-fPIC" \
|
||||
|
4
external/python3/ExternalPackage_python3.mk
vendored
4
external/python3/ExternalPackage_python3.mk
vendored
@@ -79,7 +79,7 @@ $(eval $(call gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-cor
|
||||
LO_lib/_elementtree.$(python3_EXTENSION_MODULE_SUFFIX).so \
|
||||
LO_lib/fcntl.$(python3_EXTENSION_MODULE_SUFFIX).so \
|
||||
LO_lib/grp.$(python3_EXTENSION_MODULE_SUFFIX).so \
|
||||
$(if $(DISABLE_OPENSSL),, \
|
||||
$(if $(ENABLE_OPENSSL), \
|
||||
LO_lib/_hashlib.$(python3_EXTENSION_MODULE_SUFFIX).so \
|
||||
) \
|
||||
LO_lib/_heapq.$(python3_EXTENSION_MODULE_SUFFIX).so \
|
||||
@@ -107,7 +107,7 @@ $(eval $(call gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-cor
|
||||
LO_lib/_sha512.$(python3_EXTENSION_MODULE_SUFFIX).so \
|
||||
LO_lib/_socket.$(python3_EXTENSION_MODULE_SUFFIX).so \
|
||||
LO_lib/spwd.$(python3_EXTENSION_MODULE_SUFFIX).so \
|
||||
$(if $(DISABLE_OPENSSL),, \
|
||||
$(if $(ENABLE_OPENSSL), \
|
||||
LO_lib/_ssl.$(python3_EXTENSION_MODULE_SUFFIX).so \
|
||||
) \
|
||||
LO_lib/_statistics.$(python3_EXTENSION_MODULE_SUFFIX).so \
|
||||
|
4
external/python3/ExternalProject_python3.mk
vendored
4
external/python3/ExternalProject_python3.mk
vendored
@@ -100,9 +100,9 @@ $(call gb_ExternalProject_get_state_target,python3,build) :
|
||||
--enable-shared \
|
||||
$(if $(filter 1090 101000 101100 101200,$(MAC_OS_X_VERSION_MIN_REQUIRED)),ac_cv_func_utimensat=no) \
|
||||
) \
|
||||
$(if $(SYSTEM_OPENSSL)$(DISABLE_OPENSSL),,\
|
||||
$(if $(ENABLE_OPENSSL),$(if $(SYSTEM_OPENSSL),,\
|
||||
--with-openssl=$(call gb_UnpackedTarball_get_dir,openssl) \
|
||||
) \
|
||||
) ) \
|
||||
$(if $(filter LINUX,$(OS)), \
|
||||
PKG_CONFIG_LIBDIR="$(call gb_UnpackedTarball_get_dir,libffi)/$(HOST_PLATFORM)$${PKG_CONFIG_LIBDIR:+:$$PKG_CONFIG_LIBDIR}" \
|
||||
) \
|
||||
|
25
external/xmlsec/ExternalProject_xmlsec.mk
vendored
25
external/xmlsec/ExternalProject_xmlsec.mk
vendored
@@ -9,9 +9,10 @@
|
||||
|
||||
$(eval $(call gb_ExternalProject_ExternalProject,xmlsec))
|
||||
|
||||
$(eval $(call gb_ExternalProject_use_external,xmlsec,libxml2))
|
||||
|
||||
$(eval $(call gb_ExternalProject_use_external,xmlsec,nss3))
|
||||
$(eval $(call gb_ExternalProject_use_externals,xmlsec,\
|
||||
libxml2 \
|
||||
$(if $(ENABLE_NSS),nss3,$(if $(ENABLE_OPENSSL),openssl)) \
|
||||
))
|
||||
|
||||
$(eval $(call gb_ExternalProject_register_targets,xmlsec,\
|
||||
build \
|
||||
@@ -44,11 +45,21 @@ $(call gb_ExternalProject_get_state_target,xmlsec,build) :
|
||||
--with-pic --disable-shared --disable-crypto-dl --without-libxslt --without-gnutls --without-gcrypt --disable-apps --disable-docs \
|
||||
$(if $(verbose),--disable-silent-rules,--enable-silent-rules) \
|
||||
CFLAGS="$(CFLAGS) $(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) $(if $(debug),$(gb_DEBUGINFO_FLAGS)) $(gb_VISIBILITY_FLAGS)" \
|
||||
--without-openssl \
|
||||
$(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \
|
||||
$(if $(SYSTEM_NSS),,$(if $(filter MACOSX,$(OS_FOR_BUILD)),--disable-pkgconfig)) \
|
||||
$(if $(SYSTEM_NSS),,NSPR_CFLAGS="-I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include" NSPR_LIBS="-L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lnspr4") \
|
||||
$(if $(SYSTEM_NSS),,NSS_CFLAGS="-I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss" NSS_LIBS="-L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lsmime3 -lnss3 -lnssutil3") \
|
||||
$(if $(ENABLE_NSS), \
|
||||
--without-openssl \
|
||||
$(if $(SYSTEM_NSS),, \
|
||||
$(if $(filter MACOSX,$(OS_FOR_BUILD)),--disable-pkgconfig) \
|
||||
NSPR_CFLAGS="-I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include" NSPR_LIBS="-L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lnspr4" \
|
||||
NSS_CFLAGS="-I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss" NSS_LIBS="-L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lsmime3 -lnss3 -lnssutil3" \
|
||||
), \
|
||||
$(if $(ENABLE_OPENSSL), \
|
||||
$(if $(SYSTEM_OPENSSL),, \
|
||||
OPENSSL_CFLAGS="-I$(call gb_UnpackedTarball_get_dir,openssl)/include" \
|
||||
OPENSSL_LIBS="-L$(call gb_UnpackedTarball_get_dir,openssl) -lcrypto -lssl" \
|
||||
), \
|
||||
--without-openssl) \
|
||||
) \
|
||||
$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
|
||||
$(if $(SYSBASE),CFLAGS="-I$(SYSBASE)/usr/include" \
|
||||
LDFLAGS="-L$(SYSBASE)/usr/lib $(if $(filter-out LINUX FREEBSD,$(OS)),",-Wl$(COMMA)-z$(COMMA)origin -Wl$(COMMA)-rpath$(COMMA)\\"\$$\$$ORIGIN)) \
|
||||
|
@@ -9,11 +9,9 @@
|
||||
|
||||
$(eval $(call gb_Module_Module,xmlsecurity))
|
||||
|
||||
ifeq ($(ENABLE_NSS),TRUE)
|
||||
|
||||
$(eval $(call gb_Module_add_targets,xmlsecurity,\
|
||||
Library_xmlsecurity \
|
||||
Library_xsec_xmlsec \
|
||||
$(if $(ENABLE_NSS)$(ENABLE_OPENSSL),Library_xsec_xmlsec) \
|
||||
UIConfig_xmlsec \
|
||||
))
|
||||
|
||||
@@ -40,13 +38,9 @@ $(eval $(call gb_Module_add_screenshot_targets,xmlsecurity,\
|
||||
))
|
||||
|
||||
ifneq (,$(filter DESKTOP,$(BUILD_TYPE)))
|
||||
|
||||
$(eval $(call gb_Module_add_targets,xmlsecurity,\
|
||||
Executable_pdfverify \
|
||||
))
|
||||
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
# vim: set noet sw=4 ts=4:
|
||||
|
@@ -17,7 +17,8 @@
|
||||
#include <xmlsec/xmlstreamio.hxx>
|
||||
#ifdef XMLSEC_CRYPTO_MSCRYPTO
|
||||
#include <xmlsec/mscng/crypto.h>
|
||||
#else
|
||||
#endif
|
||||
#ifdef XMLSEC_CRYPTO_NSS
|
||||
#include <xmlsec/nss/crypto.h>
|
||||
#endif
|
||||
|
||||
@@ -36,7 +37,8 @@ XSECXMLSEC_DLLPUBLIC void initXmlSec()
|
||||
xmlSecShutdown();
|
||||
throw RuntimeException();
|
||||
}
|
||||
#else
|
||||
#endif
|
||||
#ifdef XMLSEC_CRYPTO_NSS
|
||||
if( xmlSecNssInit() < 0 ) {
|
||||
xmlSecShutdown();
|
||||
throw RuntimeException();
|
||||
@@ -47,7 +49,8 @@ XSECXMLSEC_DLLPUBLIC void initXmlSec()
|
||||
if( xmlEnableStreamInputCallbacks() < 0 ) {
|
||||
#ifdef XMLSEC_CRYPTO_MSCRYPTO
|
||||
xmlSecMSCngShutdown();
|
||||
#else
|
||||
#endif
|
||||
#ifdef XMLSEC_CRYPTO_NSS
|
||||
xmlSecNssShutdown();
|
||||
#endif
|
||||
xmlSecShutdown() ;
|
||||
@@ -60,7 +63,8 @@ XSECXMLSEC_DLLPUBLIC void deInitXmlSec()
|
||||
xmlDisableStreamInputCallbacks();
|
||||
#ifdef XMLSEC_CRYPTO_MSCRYPTO
|
||||
xmlSecMSCngShutdown();
|
||||
#else
|
||||
#endif
|
||||
#ifdef XMLSEC_CRYPTO_NSS
|
||||
xmlSecNssShutdown();
|
||||
#endif
|
||||
xmlSecShutdown();
|
||||
|
Reference in New Issue
Block a user