From: Andy Polyakov Date: Mon, 11 May 2015 09:53:41 +0000 (+0200) Subject: Configure: add ios-cross target with ARM assembly support. X-Git-Tag: OpenSSL-fips-2_0_10~4 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=97fbb0c88c2f601f98e25e57b9f6f9679d14f3a8;p=oweals%2Fopenssl.git Configure: add ios-cross target with ARM assembly support. Reviewed-by: Dr. Stephen Henson --- diff --git a/Configure b/Configure index 1d0b07d3ae..1959f98c67 100755 --- a/Configure +++ b/Configure @@ -587,6 +587,7 @@ my %table=( "debug-darwin-ppc-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DB_ENDIAN -g -Wall -O::-D_REENTRANT:MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${ppc32_asm}:osx32:dlfcn:darwin-shared:-fPIC:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", # iPhoneOS/iOS "iphoneos-cross","llvm-gcc:-O3 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fomit-frame-pointer -fno-common::-D_REENTRANT:iOS:-Wl,-search_paths_first%:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:darwin-shared:-fPIC -fno-common:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", +"ios-cross","cc:-O3 -arch armv7 -mios-version-min=7.0.0 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common::-D_REENTRANT:iOS:-Wl,-search_paths_first%:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:armcap.o armv4cpuid_ios.o:bn_asm.o armv4-mont.o armv4-gf2m.o::aes_cbc.o aes-armv4.o:::sha1-armv4-large.o sha256-armv4.o sha512-armv4.o:::::::ghash-armv4.o::ios32:dlfcn:darwin-shared:-fPIC -fno-common:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", "ios64-cross","cc:-O3 -arch arm64 -mios-version-min=7.0.0 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common::-D_REENTRANT:iOS:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR -RC4_CHUNK DES_INT DES_UNROLL -BF_PTR:${aarch64_asm}:ios64:dlfcn:darwin-shared:-fPIC -fno-common:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", ##### A/UX diff --git a/config b/config index b858d80696..db5fc82bcb 100755 --- a/config +++ b/config @@ -584,8 +584,9 @@ case "$GUESSOS" in *-*-iphoneos) options="$options -arch%20${MACHINE}" OUT="iphoneos-cross" ;; - arm64-*-ios64) - options="$options -arch%20${MACHINE}" + armv7-*-ios) + OUT="ios-cross" ;; + arm64-*-ios*) OUT="ios64-cross" ;; alpha-*-linux2) ISA=`awk '/cpu model/{print$4;exit(0);}' /proc/cpuinfo` diff --git a/fips/fips_test_suite.c b/fips/fips_test_suite.c index e2506ff2ae..647de96fa1 100644 --- a/fips/fips_test_suite.c +++ b/fips/fips_test_suite.c @@ -1325,6 +1325,12 @@ int main(int argc, char **argv) FIPS_post_set_callback(post_cb); +#if defined(__APPLE__) && (defined(__arm__) || defined(__aarch64__)) + extern unsigned int OPENSSL_armcap_P; + if (0 == OPENSSL_armcap_P) + fprintf(stderr, "Optimizations disabled\n"); +#endif + printf("\tFIPS-mode test application\n"); printf("\t%s\n\n", FIPS_module_version_text()); diff --git a/fips/fipssyms.h b/fips/fipssyms.h index f5d04d073c..76db619cec 100644 --- a/fips/fipssyms.h +++ b/fips/fipssyms.h @@ -701,6 +701,16 @@ #define _sha1_block_data_order _fips_sha1_block_data_order #define _sha256_block_data_order _fips_sha256_block_data_order #define _sha512_block_data_order _fips_sha512_block_data_order +#define _AES_decrypt _fips_aes_decrypt +#define _AES_encrypt _fips_aes_encrypt +#define _AES_set_decrypt_key _fips_aes_set_decrypt_key +#define _AES_set_encrypt_key _fips_aes_set_encrypt_key +#define _gcm_gmult_4bit _fips_gcm_gmult_4bit +#define _gcm_ghash_4bit _fips_gcm_ghash_4bit +#define _gcm_gmult_neon _fips_gcm_gmult_neon +#define _gcm_ghash_neon _fips_gcm_ghash_neon +#define _bn_GF2m_mul_2x2 _fips_bn_GF2m_mul_2x2 +#define _OPENSSL_cleanse _FIPS_openssl_cleanse #endif #if defined(_MSC_VER)