Rework how our providers are built
authorRichard Levitte <levitte@openssl.org>
Thu, 3 Oct 2019 23:38:17 +0000 (01:38 +0200)
committerRichard Levitte <levitte@openssl.org>
Thu, 10 Oct 2019 12:12:15 +0000 (14:12 +0200)
commitdec95d75897125133380c7ce3c6ce58c93c06f10
treec95ecfb434a58251f6f422d413eda49f1ac53857
parente805c2d6d36d6be3db8141abc98f3ce5c6fa9776
Rework how our providers are built

We put almost everything in these internal static libraries:

libcommon               Block building code that can be used by all
                        our implementations, legacy and non-legacy
                        alike.
libimplementations      All non-legacy algorithm implementations and
                        only them.  All the code that ends up here is
                        agnostic to the definitions of FIPS_MODE.
liblegacy               All legacy implementations.

libnonfips              Support code for the algorithm implementations.
                        Built with FIPS_MODE undefined.  Any code that
                        checks that FIPS_MODE isn't defined must end
                        up in this library.
libfips                 Support code for the algorithm implementations.
                        Built with FIPS_MODE defined.  Any code that
                        checks that FIPS_MODE is defined must end up
                        in this library.

The FIPS provider module is built from providers/fips/*.c and linked
with libimplementations, libcommon and libfips.

The Legacy provider module is built from providers/legacy/*.c and
linked with liblegacy, libcommon and libcrypto.
If module building is disabled, the object files from liblegacy and
libcommon are added to libcrypto and the Legacy provider becomes a
built-in provider.

The Default provider module is built-in, so it ends up being linked
with libimplementations, libcommon and libnonfips.  For libcrypto in
form of static library, the object files from those other libraries
are simply being added to libcrypto.

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/10088)
37 files changed:
crypto/aes/build.info
crypto/bn/build.info
crypto/buffer/build.info
crypto/build.info
crypto/cmac/build.info
crypto/des/build.info
crypto/ec/build.info
crypto/evp/build.info
crypto/hmac/build.info
crypto/lhash/build.info
crypto/modes/build.info
crypto/property/build.info
crypto/rand/build.info
crypto/sha/build.info
crypto/stack/build.info
providers/build.info
providers/common/build.info
providers/common/ciphers/build.info
providers/common/ciphers/cipher_aes_xts.c
providers/common/ciphers/cipher_aes_xts.h
providers/common/ciphers/cipher_fips.c [new file with mode: 0644]
providers/common/digests/build.info
providers/common/exchange/build.info
providers/common/kdfs/build.info
providers/common/kdfs/pbkdf2.c
providers/common/kdfs/pbkdf2.h [new file with mode: 0644]
providers/common/kdfs/pbkdf2_fips.c [new file with mode: 0644]
providers/common/keymgmt/build.info
providers/common/macs/build.info
providers/common/signature/build.info
providers/default/build.info
providers/default/ciphers/build.info
providers/default/digests/build.info
providers/default/kdfs/build.info
providers/default/macs/build.info
providers/fips/build.info
providers/legacy/digests/build.info