diff options
author | Kenny Root <kroot@google.com> | 2014-11-19 11:04:10 -0800 |
---|---|---|
committer | Kenny Root <kroot@google.com> | 2014-11-20 20:07:54 +0000 |
commit | 87955877681c4c832ee3df0bdba67d3e2e3d49f2 (patch) | |
tree | ee519555da1b2f9f6501ecfa906f6ff2657c52c7 | |
parent | fc6ed1594aebe63aafa31af2bd01c41fab36d6cc (diff) | |
download | openssl-android-5.1.1_r23.tar.gz |
Add hack to fix RC4_INT problemsandroid-cts-5.1_r9android-cts-5.1_r8android-cts-5.1_r7android-cts-5.1_r6android-cts-5.1_r5android-cts-5.1_r4android-cts-5.1_r3android-cts-5.1_r2android-cts-5.1_r10android-cts-5.1_r1android-5.1.1_r9android-5.1.1_r8android-5.1.1_r7android-5.1.1_r6android-5.1.1_r5android-5.1.1_r4android-5.1.1_r37android-5.1.1_r36android-5.1.1_r35android-5.1.1_r34android-5.1.1_r33android-5.1.1_r30android-5.1.1_r3android-5.1.1_r29android-5.1.1_r28android-5.1.1_r26android-5.1.1_r25android-5.1.1_r24android-5.1.1_r23android-5.1.1_r22android-5.1.1_r20android-5.1.1_r2android-5.1.1_r19android-5.1.1_r18android-5.1.1_r17android-5.1.1_r16android-5.1.1_r15android-5.1.1_r14android-5.1.1_r13android-5.1.1_r12android-5.1.1_r10android-5.1.1_r1android-5.1.0_r5android-5.1.0_r4android-5.1.0_r3android-5.1.0_r1lollipop-mr1-wfc-releaselollipop-mr1-fi-releaselollipop-mr1-dev
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.mk | 3 | ||||
-rw-r--r-- | Crypto-config-target.mk | 3 | ||||
-rwxr-xr-x | import_openssl.sh | 6 |
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) |