]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Add FIPS support for Android Arm 64-bit
authorDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Tue, 9 Apr 2019 13:04:29 +0000 (15:04 +0200)
committerDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Tue, 16 Apr 2019 23:58:26 +0000 (01:58 +0200)
Fixes #2490
Fixes #8711

In commit 6db8e3bdc9e, support for Android Arm 64-bit was added to
the OpenSSL FIPS Object Module. For some reason, the corresponding
target 'android64-aarch64' was missing OpenSSL 1.0.2, whence it
could not be built with FIPS support on Android Arm 64-bit.
This commit adds the missing target.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/8713)

CHANGES
Configure
TABLE
config

diff --git a/CHANGES b/CHANGES
index 7080ac227d27f7a10ab7cc138b6f9f53f100de90..78c7b596b066565d4e8e4edf404d33cdc014757d 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -9,7 +9,13 @@
 
  Changes between 1.0.2r and 1.0.2s [xx XXX xxxx]
 
-  *)
+  *) Add FIPS support for Android Arm 64-bit
+
+     Support for Android Arm 64-bit was added to the OpenSSL FIPS Object Module in
+     Version 2.0.10. For some reason, the corresponding target 'android64-aarch64'
+     was missing OpenSSL 1.0.2, whence it could not be built with FIPS support on
+     Android Arm 64-bit. This omission has been fixed.
+     [Matthias St. Pierre]
 
  Changes between 1.0.2q and 1.0.2r [26 Feb 2019]
 
index c7066dc97c58de6e8f0c19968cbd32b7b3311e4c..3846c9133a2b0ea5141f952e6a0b005a28648cd4 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -475,6 +475,7 @@ my %table=(
 "android-x86","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:".eval{my $asm=${x86_elf_asm};$asm=~s/:elf/:android/;$asm}.":dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 "android-armv7","gcc:-march=armv7-a -mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 "android-mips","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${mips32_asm}:o32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android64-aarch64","gcc:-mandroid -fPIC -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -Wall::-D_REENTRANT::-pie%-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${aarch64_asm}:linux64:dlfcn:linux-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 
 #### *BSD [do see comment about ${BSDthreads} above!]
 "BSD-generic32","gcc:-O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
diff --git a/TABLE b/TABLE
index 47bdbf8102859f540e60c5baa1eba9051e5a7295..a8277f76c3b824a1f41e5d9dabc1cfe43a7ad623 100644 (file)
--- a/TABLE
+++ b/TABLE
@@ -1190,6 +1190,40 @@ $ranlib       =
 $arflags      = 
 $multilib     = 
 
+*** android64-aarch64
+$cc           = gcc
+$cflags       = -mandroid -fPIC -I$(ANDROID_DEV)/include -B$(ANDROID_DEV)/lib -O3 -Wall
+$unistd       = 
+$thread_cflag = -D_REENTRANT
+$sys_id       = 
+$lflags       = -pie%-ldl
+$bn_ops       = SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR
+$cpuid_obj    = armcap.o arm64cpuid.o mem_clr.o
+$bn_obj       = 
+$ec_obj       = 
+$des_obj      = 
+$aes_obj      = aes_core.o aes_cbc.o aesv8-armx.o
+$bf_obj       = 
+$md5_obj      = 
+$sha1_obj     = sha1-armv8.o sha256-armv8.o sha512-armv8.o
+$cast_obj     = 
+$rc4_obj      = 
+$rmd160_obj   = 
+$rc5_obj      = 
+$wp_obj       = 
+$cmll_obj     = 
+$modes_obj    = ghashv8-armx.o
+$engines_obj  = 
+$perlasm_scheme = linux64
+$dso_scheme   = dlfcn
+$shared_target= linux-shared
+$shared_cflag = 
+$shared_ldflag = 
+$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
+$ranlib       = 
+$arflags      = 
+$multilib     = 
+
 *** aux3-gcc
 $cc           = gcc
 $cflags       = -O2 -DTERMIO
diff --git a/config b/config
index 6214c4b1df9f296b39c0c0cac0f9bc749a750272..c8a3b5897d261b6ae3d01a4acbfae1ccde832c3a 100755 (executable)
--- a/config
+++ b/config
@@ -871,6 +871,7 @@ case "$GUESSOS" in
   *-*-qnx6) OUT="QNX6" ;;
   x86-*-android|i?86-*-android) OUT="android-x86" ;;
   armv[7-9]*-*-android) OUT="android-armv7" ;;
+  aarch64-*-android) OUT="android64-aarch64" ;;
   *) OUT=`echo $GUESSOS | awk -F- '{print $3}'`;;
 esac