]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix SHA, SHAKE, and KECCAK ASM flag passing
authorJuergen Christ <jchrist@linux.ibm.com>
Thu, 7 Jul 2022 16:57:55 +0000 (18:57 +0200)
committerPauli <pauli@openssl.org>
Sun, 10 Jul 2022 23:28:19 +0000 (09:28 +1000)
Flags for ASM implementations of SHA, SHAKE, and KECCAK were only passed to
the FIPS provider and not to the default or legacy provider.  This left some
potential for optimization.  Pass the correct flags also to these providers.

Signed-off-by: Juergen Christ <jchrist@linux.ibm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Patrick Steuer <patrick.steuer@de.ibm.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18747)

crypto/sha/build.info

index b934843287e4bffdc9e60091726dc301745dabe4..556a658d8b555777603ec66996c3ac3deb6ceac1 100644 (file)
@@ -82,6 +82,14 @@ SOURCE[../../providers/libfips.a]= $COMMON
 # need to be applied to all affected libraries and modules.
 DEFINE[../../libcrypto]=$SHA1DEF $KECCAK1600DEF
 DEFINE[../../providers/libfips.a]=$SHA1DEF $KECCAK1600DEF
+DEFINE[../../providers/libdefault.a]=$SHA1DEF $KECCAK1600DEF
+# We only need to include the SHA1DEF and KECCAK1600DEF stuff in the
+# legacy provider when it's a separate module and it's dynamically
+# linked with libcrypto.  Otherwise, it already gets everything that
+# the static libcrypto.a has, and doesn't need it added again.
+IF[{- !$disabled{module} && !$disabled{shared} -}]
+  DEFINE[../providers/liblegacy.a]=$SHA1DEF $KECCAK1600DEF
+ENDIF
 
 GENERATE[sha1-586.S]=asm/sha1-586.pl
 DEPEND[sha1-586.S]=../perlasm/x86asm.pl