diff --git a/Configurations/00-base-templates.conf b/Configurations/00-base-templates.conf index 2eb757534b..1bd7541cc4 100644 --- a/Configurations/00-base-templates.conf +++ b/Configurations/00-base-templates.conf @@ -162,7 +162,6 @@ my %targets=( x86_asm => { template => 1, cast_asm_src => "cast-586.s", - sha1_asm_src => "sha1-586.s sha256-586.s sha512-586.s", rc4_asm_src => "rc4-586.s", rmd160_asm_src => "rmd-586.s", rc5_asm_src => "rc5-586.s", @@ -179,7 +178,6 @@ my %targets=( }, x86_64_asm => { template => 1, - sha1_asm_src => "sha1-x86_64.s sha256-x86_64.s sha512-x86_64.s sha1-mb-x86_64.s sha256-mb-x86_64.s", rc4_asm_src => "rc4-x86_64.s rc4-md5-x86_64.s", wp_asm_src => "wp-x86_64.s", cmll_asm_src => "cmll-x86_64.s cmll_misc.c", @@ -191,14 +189,12 @@ my %targets=( }, ia64_asm => { template => 1, - sha1_asm_src => "sha1-ia64.s sha256-ia64.s sha512-ia64.s", modes_asm_src => "ghash-ia64.s", chacha_asm_src => "chacha-ia64.S", poly1305_asm_src=> "asm/poly1305-ia64.S", }, sparcv9_asm => { template => 1, - sha1_asm_src => "sha1-sparcv9.S sha256-sparcv9.S sha512-sparcv9.S", cmll_asm_src => "camellia.c cmll_misc.c cmll_cbc.c cmllt4-sparcv9.S", modes_asm_src => "ghash-sparcv9.S", poly1305_asm_src=> "poly1305-sparcv9.S", @@ -208,22 +204,18 @@ my %targets=( }, alpha_asm => { template => 1, - sha1_asm_src => "sha1-alpha.S", modes_asm_src => "ghash-alpha.S", }, mips32_asm => { template => 1, - sha1_asm_src => "sha1-mips.S sha256-mips.S", }, mips64_asm => { inherit_from => [ "mips32_asm" ], template => 1, - sha1_asm_src => add("sha512-mips.S"), poly1305_asm_src=> "poly1305-mips.S", }, s390x_asm => { template => 1, - sha1_asm_src => "sha1-s390x.S sha256-s390x.S sha512-s390x.S", rc4_asm_src => "rc4-s390x.s", modes_asm_src => "ghash-s390x.S", chacha_asm_src => "chacha-s390x.S", @@ -232,7 +224,6 @@ my %targets=( }, armv4_asm => { template => 1, - sha1_asm_src => "sha1-armv4-large.S sha256-armv4.S sha512-armv4.S", modes_asm_src => "ghash-armv4.S ghashv8-armx.S", chacha_asm_src => "chacha-armv4.S", poly1305_asm_src=> "poly1305-armv4.S", @@ -240,7 +231,6 @@ my %targets=( }, aarch64_asm => { template => 1, - sha1_asm_src => "sha1-armv8.S sha256-armv8.S sha512-armv8.S", modes_asm_src => "ghashv8-armx.S", chacha_asm_src => "chacha-armv8.S", poly1305_asm_src=> "poly1305-armv8.S", @@ -248,7 +238,6 @@ my %targets=( }, parisc11_asm => { template => 1, - sha1_asm_src => "sha1-parisc.s sha256-parisc.s sha512-parisc.s", rc4_asm_src => "rc4-parisc.s", modes_asm_src => "ghash-parisc.s", }, @@ -258,7 +247,6 @@ my %targets=( }, ppc32_asm => { template => 1, - sha1_asm_src => "sha1-ppc.s sha256-ppc.s sha512-ppc.s sha256p8-ppc.s sha512p8-ppc.s", modes_asm_src => "ghashp8-ppc.s", chacha_asm_src => "chacha-ppc.s", poly1305_asm_src=> "poly1305-ppc.s poly1305-ppcfp.s", diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf index 51caa30f9d..9e16bcbf88 100644 --- a/Configurations/10-main.conf +++ b/Configurations/10-main.conf @@ -949,7 +949,6 @@ my %targets = ( cppflags => combine("-DOPENSSL_SMALL_FOOTPRINT", threads("-D_REENTRANT")), bn_ops => "BN_LLONG", - sha1_asm_src => "sha1-c64xplus.s sha256-c64xplus.s sha512-c64xplus.s", rc4_asm_src => "rc4-c64xplus.s", modes_asm_src => "ghash-c64xplus.s", chacha_asm_src => "chacha-c64xplus.s", diff --git a/Configurations/README b/Configurations/README index f8d52cad9e..0d6e5ee962 100644 --- a/Configurations/README +++ b/Configurations/README @@ -240,9 +240,6 @@ In each table entry, the following keys are significant: export vars as accessor functions. - sha1_asm_src => Assembler implementation of core SHA1, - functions, and also possibly SHA256 and - SHA512 ones. cast_asm_src => Assembler implementation of core CAST functions. Defaults to 'c_enc.c' diff --git a/Configure b/Configure index 7ff3b69350..3e9fd6257a 100755 --- a/Configure +++ b/Configure @@ -1404,11 +1404,6 @@ if ($target{sys_id} ne "") } unless ($disabled{asm}) { - if ($target{sha1_asm_src}) { - push @{$config{lib_defines}}, "SHA1_ASM" if ($target{sha1_asm_src} =~ /sx86/ || $target{sha1_asm_src} =~ /sha1/); - push @{$config{lib_defines}}, "SHA256_ASM" if ($target{sha1_asm_src} =~ /sha256/); - push @{$config{lib_defines}}, "SHA512_ASM" if ($target{sha1_asm_src} =~ /sha512/); - } if ($target{keccak1600_asm_src} ne $table{DEFAULTS}->{keccak1600_asm_src}) { push @{$config{lib_defines}}, "KECCAK1600_ASM"; } @@ -3364,7 +3359,6 @@ sub print_table_entry "ex_libs", "bn_ops", "cast_asm_src", - "sha1_asm_src", "rc4_asm_src", "rmd160_asm_src", "rc5_asm_src", diff --git a/crypto/sha/build.info b/crypto/sha/build.info index fa2ec9be07..c9ade6e522 100644 --- a/crypto/sha/build.info +++ b/crypto/sha/build.info @@ -1,9 +1,64 @@ LIBS=../../libcrypto -$COMMON=sha1dgst.c sha256.c sha512.c sha3.c \ - {- $target{sha1_asm_src} -} {- $target{keccak1600_asm_src} -} +$SHA1ASM= +IF[{- !$disabled{asm} -}] + $SHA1ASM_x86=sha1-586.s sha256-586.s sha512-586.s + $SHA1DEF_x86=SHA1_ASM SHA256_ASM SHA512_ASM + $SHA1ASM_x86_64=\ + sha1-x86_64.s sha256-x86_64.s sha512-x86_64.s sha1-mb-x86_64.s \ + sha256-mb-x86_64.s + $SHA1DEF_x86_64=SHA1_ASM SHA256_ASM SHA512_ASM + + $SHA1ASM_ia64=sha1-ia64.s sha256-ia64.s sha512-ia64.s + $SHA1DEF_ia64=SHA1_ASM SHA256_ASM SHA512_ASM + + $SHA1ASM_sparcv9=sha1-sparcv9.S sha256-sparcv9.S sha512-sparcv9.S + $SHA1DEF_sparcv9=SHA1_ASM SHA256_ASM SHA512_ASM + + $SHA1ASM_alpha=sha1-alpha.S + $SHA1DEF_alpha=SHA1_ASM + + $SHA1ASM_mips32=sha1-mips.S sha256-mips.S + $SHA1DEF_mips32=SHA1_ASM SHA256_ASM + $SHA1ASM_mips64=$SHA1ASM_mips32 sha512-mips.S + $SHA1DEF_mips64=$SHA1DEF_mips32 SHA512_ASM + + $SHA1ASM_s390x=sha1-s390x.S sha256-s390x.S sha512-s390x.S + $SHA1DEF_s390x=SHA1_ASM SHA256_ASM SHA512_ASM + + $SHA1ASM_armv4=sha1-armv4-large.S sha256-armv4.S sha512-armv4.S + $SHA1DEF_armv4=SHA1_ASM SHA256_ASM SHA512_ASM + $SHA1ASM_aarch64=sha1-armv8.S sha256-armv8.S sha512-armv8.S + $SHA1DEF_aarch64=SHA1_ASM SHA256_ASM SHA512_ASM + + $SHA1ASM_parisc11=sha1-parisc.s sha256-parisc.s sha512-parisc.s + $SHA1DEF_parisc11=SHA1_ASM SHA256_ASM SHA512_ASM + $SHA1ASM_parisc20_64=$SHA1ASM_parisc11 + $SHA1DEF_parisc20_64=$SHA1DEF_parisc11 + + $SHA1ASM_ppc32=\ + sha1-ppc.s sha256-ppc.s sha512-ppc.s sha256p8-ppc.s sha512p8-ppc.s + $SHA1DEF_ppc32=SHA1_ASM SHA256_ASM SHA512_ASM + $SHA1ASM_ppc64=$SHA1ASM_ppc32 + $SHA1DEF_ppc64=$SHA1DEF_ppc32 + + $SHA1ASM_c64xplus=sha1-c64xplus.s sha256-c64xplus.s sha512-c64xplus.s + $SHA1DEF_c64xplus=SHA1_ASM SHA256_ASM SHA512_ASM + + # Now that we have defined all the arch specific variables, use the + # appropriate one, and define the appropriate macros + IF[$SHA1ASM_{- $target{asm_arch} -}] + $SHA1ASM=$SHA1ASM_{- $target{asm_arch} -} + $SHA1DEF=$SHA1DEF_{- $target{asm_arch} -} + ENDIF +ENDIF + +$COMMON=sha1dgst.c sha256.c sha512.c sha3.c $SHA1ASM \ + {- $target{keccak1600_asm_src} -} SOURCE[../../libcrypto]=$COMMON sha1_one.c +DEFINE[../../libcrypto]=$SHA1DEF SOURCE[../../providers/fips]= $COMMON +DEFINE[../../providers/fips]= $SHA1DEF GENERATE[sha1-586.s]=asm/sha1-586.pl \ $(PERLASM_SCHEME) $(LIB_CFLAGS) $(LIB_CPPFLAGS) $(PROCESSOR)