aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenny Root <kroot@google.com>2014-11-19 11:04:10 -0800
committerKenny Root <kroot@google.com>2014-11-20 20:07:54 +0000
commit87955877681c4c832ee3df0bdba67d3e2e3d49f2 (patch)
treeee519555da1b2f9f6501ecfa906f6ff2657c52c7
parentfc6ed1594aebe63aafa31af2bd01c41fab36d6cc (diff)
downloadopenssl-87955877681c4c832ee3df0bdba67d3e2e3d49f2.tar.gz
The opensslconf.h for 64-bit has a special case for linux-x86_64 that sets RC4_INT to "unsigned int" instead of "unsigned char" Without this hack, any server that chooses RC4-SHA for the SSL connection will segmentation fault on x86-64 since the assembly code disagrees with the field size that C believes it is. (cherry picked from commit 9eca647003c7969ecb6fce2b5ff3965d3536fa67) Bug: 18434518 Change-Id: I4eb1395fc122df5185af74500f4155a1095535c5
-rw-r--r--Crypto-config-host.mk3
-rw-r--r--Crypto-config-target.mk3
-rwxr-xr-ximport_openssl.sh6
3 files changed, 12 insertions, 0 deletions
diff --git a/Crypto-config-host.mk b/Crypto-config-host.mk
index eaff7bbdce..5c63e9ecd0 100644
--- a/Crypto-config-host.mk
+++ b/Crypto-config-host.mk
@@ -697,6 +697,9 @@ mips_exclude_files := \
crypto/bn/bn_asm.c \
+# "Temporary" hack until this can be fixed in openssl.config
+x86_64_cflags += -DRC4_INT="unsigned int"
+
LOCAL_CFLAGS += $(common_cflags)
LOCAL_C_INCLUDES += $(common_c_includes) $(local_c_includes)
diff --git a/Crypto-config-target.mk b/Crypto-config-target.mk
index e3b867f173..6fee75b357 100644
--- a/Crypto-config-target.mk
+++ b/Crypto-config-target.mk
@@ -697,6 +697,9 @@ mips_exclude_files := \
crypto/bn/bn_asm.c \
+# "Temporary" hack until this can be fixed in openssl.config
+x86_64_cflags += -DRC4_INT="unsigned int"
+
LOCAL_CFLAGS += $(common_cflags)
LOCAL_C_INCLUDES += $(common_c_includes)
diff --git a/import_openssl.sh b/import_openssl.sh
index f16596bc81..ea5f361d6c 100755
--- a/import_openssl.sh
+++ b/import_openssl.sh
@@ -450,6 +450,12 @@ LOCAL_ADDITIONAL_DEPENDENCIES += \$(LOCAL_PATH)/$(basename $output)
done
+ if [ $prefix == "CRYPTO" ]; then
+ echo "
+# \"Temporary\" hack until this can be fixed in openssl.config
+x86_64_cflags += -DRC4_INT=\"unsigned int\""
+ fi
+
if [ $3 == "target" ]; then
echo "
LOCAL_CFLAGS += \$(common_cflags)