When deprecated symbols are removed, ensure liblegacy has WHIRLPOOL
authorRichard Levitte <levitte@openssl.org>
Wed, 8 Jan 2020 10:52:38 +0000 (11:52 +0100)
committerPauli <paul.dale@oracle.com>
Sun, 12 Jan 2020 02:05:04 +0000 (12:05 +1000)
The legacy module implements WHIRLPOOL, so we must ensure it has the
full functionality, even when libcrypto stops exporting the symbols.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/10779)

crypto/whrlpool/build.info

index 6630a779f424523822e43731dd085766c5f9e154..c48971885865cdf5a28806ddff1345697611fbd5 100644 (file)
@@ -17,13 +17,21 @@ IF[{- !$disabled{asm} -}]
   ENDIF
 ENDIF
 
-SOURCE[../../libcrypto]=wp_dgst.c $WPASM
-
 # Implementations are now spread across several libraries, so the defines
 # need to be applied to all affected libraries and modules.
-DEFINE[../../libcrypto]=$WPDEF
 DEFINE[../../providers/libimplementations.a]=$WPDEF
 
+SOURCE[../../libcrypto]=wp_dgst.c $WPASM
+DEFINE[../../libcrypto]=$WPDEF
+
+# When all deprecated symbols are removed, libcrypto doesn't export the
+# WHIRLPOOL functions, so we must include them directly in liblegacy.a
+IF[{- $disabled{"deprecated"}
+      && (defined $config{"api"} && $config{"api"} >= 30000) -}]
+  SOURCE[../../providers/liblegacy.a]=wp_dgst.c $WPASM
+  DEFINE[../../providers/liblegacy.a]=$WPDEF
+ENDIF
+
 GENERATE[wp-mmx.s]=asm/wp-mmx.pl
 DEPEND[wp-mmx.s]=../perlasm/x86asm.pl