openssl/providers/fips
Hongren Zheng a192b2439c fips provider: explicitly setup cpuid when initializing
Fixes: #23979

Previously fips module relied on OPENSSL_cpuid_setup
being used as constructor by the linker to correctly
setup the capability vector, either via .section .init
(for x86_64) or via __attribute__((constructor)).

This would make ld.so call OPENSSL_cpuid_setup before
the init function for fips module. However, this early
constructing behavior has several disadvantages:

1. Not all platform/toolchain supports such behavior

2. Initialisation sequence is not well defined, and
some function might not be initialized when cpuid_setup
is called

3. Implicit path is hard to maintain and debug

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24419)
2024-05-20 10:14:39 +02:00
..
build.info PROV: Relegate most of the FIPS provider code to libfips.a 2021-05-21 12:08:31 +02:00
fips_entry.c PROV: Relegate most of the FIPS provider code to libfips.a 2021-05-21 12:08:31 +02:00
fipsprov.c fips provider: explicitly setup cpuid when initializing 2024-05-20 10:14:39 +02:00
self_test_data.inc Adjust FIPS EC/DSA self test data for different nonce generation 2024-05-02 09:21:30 +02:00
self_test_kats.c Copyright year updates 2023-09-28 14:23:29 +01:00
self_test.c fips selftest: avoid relying on a real RNG for self tests 2023-09-27 17:22:54 +01:00
self_test.h Rename OPENSSL_CTX prefix to OSSL_LIB_CTX 2020-10-15 11:59:53 +01:00