]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix EC ASM flag passing
authorJuergen Christ <jchrist@linux.ibm.com>
Wed, 13 Jul 2022 09:15:43 +0000 (11:15 +0200)
committerTomas Mraz <tomas@openssl.org>
Thu, 14 Jul 2022 12:02:59 +0000 (14:02 +0200)
Flags for ASM implementations of EC curves 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: Patrick Steuer <patrick.steuer@de.ibm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18791)

crypto/ec/build.info

index 70ec25079df9760630d3c325c800a08c94f8a8e6..a511e887a9ba19a7765264fa1ee55b80e5cce09a 100644 (file)
@@ -71,6 +71,14 @@ SOURCE[../../providers/libfips.a]=$COMMON
 # need to be applied to all affected libraries and modules.
 DEFINE[../../libcrypto]=$ECDEF
 DEFINE[../../providers/libfips.a]=$ECDEF
+DEFINE[../../providers/libdefault.a]=$ECDEF
+# We only need to include the ECDEF 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]=$ECDEF
+ENDIF
 
 GENERATE[ecp_nistz256-x86.S]=asm/ecp_nistz256-x86.pl