Disable SSL compression
Bug: 7079965
Change-Id: I0efabd6bfb88ca841f68c0669a9c1f1a7d9bd6cf
diff --git a/Apps.mk b/Apps.mk
index e78395e..e6df452 100644
--- a/Apps.mk
+++ b/Apps.mk
@@ -63,6 +63,8 @@
local_cflags := -DMONOLITH
+local_additional_dependencies := $(LOCAL_PATH)/android-config.mk $(LOCAL_PATH)/Apps.mk
+
include $(CLEAR_VARS)
LOCAL_MODULE:= openssl
LOCAL_MODULE_TAGS := optional
@@ -70,6 +72,7 @@
LOCAL_SHARED_LIBRARIES := $(local_shared_libraries)
LOCAL_C_INCLUDES := $(local_c_includes)
LOCAL_CFLAGS := $(local_cflags)
+LOCAL_ADDITIONAL_DEPENDENCIES := $(local_additional_dependencies)
include $(LOCAL_PATH)/android-config.mk
include $(BUILD_EXECUTABLE)
@@ -80,5 +83,6 @@
LOCAL_SHARED_LIBRARIES := $(local_shared_libraries)
LOCAL_C_INCLUDES := $(local_c_includes)
LOCAL_CFLAGS := $(local_cflags)
+LOCAL_ADDITIONAL_DEPENDENCIES := $(local_additional_dependencies)
include $(LOCAL_PATH)/android-config.mk
include $(BUILD_HOST_EXECUTABLE)
diff --git a/Crypto.mk b/Crypto.mk
index e93994f..23a4f03 100644
--- a/Crypto.mk
+++ b/Crypto.mk
@@ -538,6 +538,8 @@
local_c_includes += $(log_c_includes)
+local_additional_dependencies := $(LOCAL_PATH)/android-config.mk $(LOCAL_PATH)/Crypto.mk
+
#######################################
# target static library
include $(CLEAR_VARS)
@@ -571,6 +573,7 @@
endif
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE:= libcrypto_static
+LOCAL_ADDITIONAL_DEPENDENCIES := $(local_additional_dependencies)
include $(BUILD_STATIC_LIBRARY)
#######################################
@@ -583,10 +586,10 @@
ifeq ($(TARGET_ARCH),arm)
LOCAL_NDK_VERSION := 5
LOCAL_SDK_VERSION := 9
-# Use the NDK prebuilt libz and libdl.
-LOCAL_LDFLAGS += -lz -ldl
+# Use the NDK prebuilt libdl.
+LOCAL_LDFLAGS += -ldl
else
-LOCAL_SHARED_LIBRARIES += libz libdl
+LOCAL_SHARED_LIBRARIES += libdl
endif
LOCAL_SRC_FILES += $(local_src_files)
@@ -610,6 +613,7 @@
endif
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE:= libcrypto
+LOCAL_ADDITIONAL_DEPENDENCIES := $(local_additional_dependencies)
include $(BUILD_SHARED_LIBRARY)
#######################################
@@ -622,10 +626,10 @@
LOCAL_ASFLAGS += $(local_as_flags)
LOCAL_C_INCLUDES += $(local_c_includes)
LOCAL_SRC_FILES += $(other_arch_src_files)
-LOCAL_STATIC_LIBRARIES += libz
LOCAL_LDLIBS += -ldl
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE:= libcrypto
+LOCAL_ADDITIONAL_DEPENDENCIES := $(local_additional_dependencies)
include $(BUILD_HOST_SHARED_LIBRARY)
########################################
@@ -639,8 +643,8 @@
LOCAL_ASFLAGS += $(local_as_flags)
LOCAL_C_INCLUDES += $(local_c_includes)
LOCAL_SRC_FILES += $(other_arch_src_files)
-LOCAL_STATIC_LIBRARIES += libz
LOCAL_LDLIBS += -ldl
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE:= libcrypto_static
+LOCAL_ADDITIONAL_DEPENDENCIES := $(local_additional_dependencies)
include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/Ssl.mk b/Ssl.mk
index 32107ee..e0bb716 100644
--- a/Ssl.mk
+++ b/Ssl.mk
@@ -50,6 +50,8 @@
local_c_includes += $(log_c_includes)
+local_additional_dependencies := $(LOCAL_PATH)/android-config.mk $(LOCAL_PATH)/Ssl.mk
+
#######################################
# target static library
include $(CLEAR_VARS)
@@ -64,6 +66,7 @@
LOCAL_SHARED_LIBRARIES = $(log_shared_libraries)
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE:= libssl_static
+LOCAL_ADDITIONAL_DEPENDENCIES := $(local_additional_dependencies)
include $(BUILD_STATIC_LIBRARY)
#######################################
@@ -80,6 +83,7 @@
LOCAL_SHARED_LIBRARIES += libcrypto $(log_shared_libraries)
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE:= libssl
+LOCAL_ADDITIONAL_DEPENDENCIES := $(local_additional_dependencies)
include $(BUILD_SHARED_LIBRARY)
#######################################
@@ -91,6 +95,7 @@
LOCAL_SHARED_LIBRARIES += libcrypto $(log_shared_libraries)
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE:= libssl
+LOCAL_ADDITIONAL_DEPENDENCIES := $(local_additional_dependencies)
include $(BUILD_HOST_SHARED_LIBRARY)
#######################################
@@ -102,4 +107,5 @@
LOCAL_SHARED_LIBRARIES := libssl libcrypto $(log_shared_libraries)
LOCAL_MODULE:= ssltest
LOCAL_MODULE_TAGS := optional
+LOCAL_ADDITIONAL_DEPENDENCIES := $(local_additional_dependencies)
include $(BUILD_EXECUTABLE)
diff --git a/android-config.mk b/android-config.mk
index 08f161d..323cc39 100644
--- a/android-config.mk
+++ b/android-config.mk
@@ -15,10 +15,13 @@
LOCAL_CFLAGS += -DOPENSSL_NO_CAMELLIA -DOPENSSL_NO_CAPIENG -DOPENSSL_NO_CAST -DOPENSSL_NO_CMS -DOPENSSL_NO_GMP -DOPENSSL_NO_IDEA -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_MDC2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_SHA0 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SEED -DOPENSSL_NO_STORE -DOPENSSL_NO_WHIRLPOOL
# Extra
-LOCAL_CFLAGS += -DOPENSSL_NO_STATIC_ENGINE -DOPENSSL_NO_GOST -DZLIB -DOPENSSL_NO_DTLS1 -DOPENSSL_NO_RSAX -DOPENSSL_NO_RDRAND -DOPENSSL_NO_SCTP -DOPENSSL_NO_HEARTBEATS
+LOCAL_CFLAGS += -DOPENSSL_NO_STATIC_ENGINE -DOPENSSL_NO_GOST -DOPENSSL_NO_DTLS1 -DOPENSSL_NO_RSAX -DOPENSSL_NO_RDRAND -DOPENSSL_NO_SCTP -DOPENSSL_NO_HEARTBEATS
# Directories
LOCAL_CFLAGS += -DOPENSSLDIR="\"/system/lib/ssl\"" -DENGINESDIR="\"/system/lib/ssl/engines\""
+# Intentionally excluded http://b/7079965
+# -DZLIB
+
# Debug
# LOCAL_CFLAGS += -DCIPHER_DEBUG